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
d9514f6c
Commit
d9514f6c
authored
Dec 06, 2007
by
Matthew Wilcox
Committed by
Matthew Wilcox
Dec 06, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sched: Use task_contributes_to_load, TASK_ALL and TASK_NORMAL
Signed-off-by:
Matthew Wilcox
<
willy@linux.intel.com
>
parent
6618a3e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
kernel/sched.c
kernel/sched.c
+5
-8
No files found.
kernel/sched.c
View file @
d9514f6c
...
@@ -992,7 +992,7 @@ static int effective_prio(struct task_struct *p)
...
@@ -992,7 +992,7 @@ static int effective_prio(struct task_struct *p)
*/
*/
static
void
activate_task
(
struct
rq
*
rq
,
struct
task_struct
*
p
,
int
wakeup
)
static
void
activate_task
(
struct
rq
*
rq
,
struct
task_struct
*
p
,
int
wakeup
)
{
{
if
(
p
->
state
==
TASK_UNINTERRUPTIBLE
)
if
(
task_contributes_to_load
(
p
)
)
rq
->
nr_uninterruptible
--
;
rq
->
nr_uninterruptible
--
;
enqueue_task
(
rq
,
p
,
wakeup
);
enqueue_task
(
rq
,
p
,
wakeup
);
...
@@ -1004,7 +1004,7 @@ static void activate_task(struct rq *rq, struct task_struct *p, int wakeup)
...
@@ -1004,7 +1004,7 @@ static void activate_task(struct rq *rq, struct task_struct *p, int wakeup)
*/
*/
static
void
deactivate_task
(
struct
rq
*
rq
,
struct
task_struct
*
p
,
int
sleep
)
static
void
deactivate_task
(
struct
rq
*
rq
,
struct
task_struct
*
p
,
int
sleep
)
{
{
if
(
p
->
state
==
TASK_UNINTERRUPTIBLE
)
if
(
task_contributes_to_load
(
p
)
)
rq
->
nr_uninterruptible
++
;
rq
->
nr_uninterruptible
++
;
dequeue_task
(
rq
,
p
,
sleep
);
dequeue_task
(
rq
,
p
,
sleep
);
...
@@ -1646,8 +1646,7 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
...
@@ -1646,8 +1646,7 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync)
int
fastcall
wake_up_process
(
struct
task_struct
*
p
)
int
fastcall
wake_up_process
(
struct
task_struct
*
p
)
{
{
return
try_to_wake_up
(
p
,
TASK_STOPPED
|
TASK_TRACED
|
return
try_to_wake_up
(
p
,
TASK_ALL
,
0
);
TASK_INTERRUPTIBLE
|
TASK_UNINTERRUPTIBLE
,
0
);
}
}
EXPORT_SYMBOL
(
wake_up_process
);
EXPORT_SYMBOL
(
wake_up_process
);
...
@@ -3857,8 +3856,7 @@ void complete(struct completion *x)
...
@@ -3857,8 +3856,7 @@ void complete(struct completion *x)
spin_lock_irqsave
(
&
x
->
wait
.
lock
,
flags
);
spin_lock_irqsave
(
&
x
->
wait
.
lock
,
flags
);
x
->
done
++
;
x
->
done
++
;
__wake_up_common
(
&
x
->
wait
,
TASK_UNINTERRUPTIBLE
|
TASK_INTERRUPTIBLE
,
__wake_up_common
(
&
x
->
wait
,
TASK_NORMAL
,
1
,
0
,
NULL
);
1
,
0
,
NULL
);
spin_unlock_irqrestore
(
&
x
->
wait
.
lock
,
flags
);
spin_unlock_irqrestore
(
&
x
->
wait
.
lock
,
flags
);
}
}
EXPORT_SYMBOL
(
complete
);
EXPORT_SYMBOL
(
complete
);
...
@@ -3869,8 +3867,7 @@ void complete_all(struct completion *x)
...
@@ -3869,8 +3867,7 @@ void complete_all(struct completion *x)
spin_lock_irqsave
(
&
x
->
wait
.
lock
,
flags
);
spin_lock_irqsave
(
&
x
->
wait
.
lock
,
flags
);
x
->
done
+=
UINT_MAX
/
2
;
x
->
done
+=
UINT_MAX
/
2
;
__wake_up_common
(
&
x
->
wait
,
TASK_UNINTERRUPTIBLE
|
TASK_INTERRUPTIBLE
,
__wake_up_common
(
&
x
->
wait
,
TASK_NORMAL
,
0
,
0
,
NULL
);
0
,
0
,
NULL
);
spin_unlock_irqrestore
(
&
x
->
wait
.
lock
,
flags
);
spin_unlock_irqrestore
(
&
x
->
wait
.
lock
,
flags
);
}
}
EXPORT_SYMBOL
(
complete_all
);
EXPORT_SYMBOL
(
complete_all
);
...
...
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