Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
40d78f02
Commit
40d78f02
authored
Aug 21, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppc64: merge in changes from x86 irq balance code
parent
f3d84663
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
arch/ppc64/kernel/irq.c
arch/ppc64/kernel/irq.c
+10
-4
No files found.
arch/ppc64/kernel/irq.c
View file @
40d78f02
...
...
@@ -410,11 +410,13 @@ static irq_balance_t irq_balance[NR_IRQS] __cacheline_aligned
=
{
[
0
...
NR_IRQS
-
1
]
=
{
0
,
0
}
};
#define IDLE_ENOUGH(cpu,now) \
(idle_cpu(cpu) && ((now) - irq_stat[(cpu)].idle_timestamp >
((HZ/100)+1)
))
(idle_cpu(cpu) && ((now) - irq_stat[(cpu)].idle_timestamp >
1
))
#define IRQ_ALLOWED(cpu,allowed_mask) \
((1 << cpu) & (allowed_mask))
#define IRQ_BALANCE_INTERVAL (HZ/50)
static
unsigned
long
move
(
unsigned
long
curr_cpu
,
unsigned
long
allowed_mask
,
unsigned
long
now
,
int
direction
)
{
...
...
@@ -447,8 +449,9 @@ static inline void balance_irq(int irq)
irq_balance_t
*
entry
=
irq_balance
+
irq
;
unsigned
long
now
=
jiffies
;
if
(
unlikely
(
entry
->
timestamp
!=
now
))
{
if
(
unlikely
(
time_after
(
now
,
entry
->
timestamp
+
IRQ_BALANCE_INTERVAL
)
))
{
unsigned
long
allowed_mask
;
unsigned
int
new_cpu
;
unsigned
long
random_number
;
if
(
!
irq_desc
[
irq
].
handler
->
set_affinity
)
...
...
@@ -459,8 +462,11 @@ static inline void balance_irq(int irq)
allowed_mask
=
cpu_online_map
&
irq_affinity
[
irq
];
entry
->
timestamp
=
now
;
entry
->
cpu
=
move
(
entry
->
cpu
,
allowed_mask
,
now
,
random_number
);
irq_desc
[
irq
].
handler
->
set_affinity
(
irq
,
1
<<
entry
->
cpu
);
new_cpu
=
move
(
entry
->
cpu
,
allowed_mask
,
now
,
random_number
);
if
(
entry
->
cpu
!=
new_cpu
)
{
entry
->
cpu
=
new_cpu
;
irq_desc
[
irq
].
handler
->
set_affinity
(
irq
,
1
<<
new_cpu
);
}
}
}
#else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment