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
d1347e18
Commit
d1347e18
authored
May 18, 2003
by
Ingo Molnar
Committed by
Linus Torvalds
May 18, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] scheduler cleanup
This removes the unused requeueing code.
parent
79e4dd94
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
21 deletions
+3
-21
kernel/sched.c
kernel/sched.c
+3
-21
No files found.
kernel/sched.c
View file @
d1347e18
...
@@ -340,10 +340,9 @@ static inline void __activate_task(task_t *p, runqueue_t *rq)
...
@@ -340,10 +340,9 @@ static inline void __activate_task(task_t *p, runqueue_t *rq)
* Update all the scheduling statistics stuff. (sleep average
* Update all the scheduling statistics stuff. (sleep average
* calculation, priority modifiers, etc.)
* calculation, priority modifiers, etc.)
*/
*/
static
inline
int
activate_task
(
task_t
*
p
,
runqueue_t
*
rq
)
static
inline
void
activate_task
(
task_t
*
p
,
runqueue_t
*
rq
)
{
{
long
sleep_time
=
jiffies
-
p
->
last_run
-
1
;
long
sleep_time
=
jiffies
-
p
->
last_run
-
1
;
int
requeue_waker
=
0
;
if
(
sleep_time
>
0
)
{
if
(
sleep_time
>
0
)
{
int
sleep_avg
;
int
sleep_avg
;
...
@@ -372,8 +371,6 @@ static inline int activate_task(task_t *p, runqueue_t *rq)
...
@@ -372,8 +371,6 @@ static inline int activate_task(task_t *p, runqueue_t *rq)
}
}
}
}
__activate_task
(
p
,
rq
);
__activate_task
(
p
,
rq
);
return
requeue_waker
;
}
}
/*
/*
...
@@ -471,8 +468,8 @@ void wait_task_inactive(task_t * p)
...
@@ -471,8 +468,8 @@ void wait_task_inactive(task_t * p)
*/
*/
static
int
try_to_wake_up
(
task_t
*
p
,
unsigned
int
state
,
int
sync
,
int
kick
)
static
int
try_to_wake_up
(
task_t
*
p
,
unsigned
int
state
,
int
sync
,
int
kick
)
{
{
int
success
=
0
,
requeue_waker
=
0
;
unsigned
long
flags
;
unsigned
long
flags
;
int
success
=
0
;
long
old_state
;
long
old_state
;
runqueue_t
*
rq
;
runqueue_t
*
rq
;
...
@@ -498,7 +495,7 @@ static int try_to_wake_up(task_t * p, unsigned int state, int sync, int kick)
...
@@ -498,7 +495,7 @@ static int try_to_wake_up(task_t * p, unsigned int state, int sync, int kick)
if
(
sync
)
if
(
sync
)
__activate_task
(
p
,
rq
);
__activate_task
(
p
,
rq
);
else
{
else
{
requeue_waker
=
activate_task
(
p
,
rq
);
activate_task
(
p
,
rq
);
if
(
p
->
prio
<
rq
->
curr
->
prio
)
if
(
p
->
prio
<
rq
->
curr
->
prio
)
resched_task
(
rq
->
curr
);
resched_task
(
rq
->
curr
);
}
}
...
@@ -510,21 +507,6 @@ static int try_to_wake_up(task_t * p, unsigned int state, int sync, int kick)
...
@@ -510,21 +507,6 @@ static int try_to_wake_up(task_t * p, unsigned int state, int sync, int kick)
}
}
task_rq_unlock
(
rq
,
&
flags
);
task_rq_unlock
(
rq
,
&
flags
);
/*
* We have to do this outside the other spinlock, the two
* runqueues might be different:
*/
if
(
requeue_waker
)
{
prio_array_t
*
array
;
rq
=
task_rq_lock
(
current
,
&
flags
);
array
=
current
->
array
;
dequeue_task
(
current
,
array
);
current
->
prio
=
effective_prio
(
current
);
enqueue_task
(
current
,
array
);
task_rq_unlock
(
rq
,
&
flags
);
}
return
success
;
return
success
;
}
}
...
...
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