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
nexedi
linux
Commits
8509486a
Commit
8509486a
authored
Jun 18, 2002
by
Ingo Molnar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- sync wakeup affinity fix: do not fast-migrate threads
without making sure that the target CPU is allowed.
parent
f042243c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
kernel/sched.c
kernel/sched.c
+11
-6
No files found.
kernel/sched.c
View file @
8509486a
...
...
@@ -361,12 +361,17 @@ static int try_to_wake_up(task_t * p, int sync)
rq
=
task_rq_lock
(
p
,
&
flags
);
old_state
=
p
->
state
;
if
(
!
p
->
array
)
{
if
(
unlikely
(
sync
&&
(
rq
->
curr
!=
p
)))
{
if
(
p
->
thread_info
->
cpu
!=
smp_processor_id
())
{
p
->
thread_info
->
cpu
=
smp_processor_id
();
task_rq_unlock
(
rq
,
&
flags
);
goto
repeat_lock_task
;
}
/*
* Fast-migrate the task if it's not running or runnable
* currently. Do not violate hard affinity.
*/
if
(
unlikely
(
sync
&&
(
rq
->
curr
!=
p
)
&&
(
p
->
thread_info
->
cpu
!=
smp_processor_id
())
&&
(
p
->
cpus_allowed
&
(
1UL
<<
smp_processor_id
()))))
{
p
->
thread_info
->
cpu
=
smp_processor_id
();
task_rq_unlock
(
rq
,
&
flags
);
goto
repeat_lock_task
;
}
if
(
old_state
==
TASK_UNINTERRUPTIBLE
)
rq
->
nr_uninterruptible
--
;
...
...
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