Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
80bf3171
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
80bf3171
编写于
1月 25, 2008
作者:
I
Ingo Molnar
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sched: clean up pull_rt_task()
clean up pull_rt_task(). Signed-off-by:
N
Ingo Molnar
<
mingo@elte.hu
>
上级
00597c3e
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
12 deletion
+10
-12
kernel/sched_rt.c
kernel/sched_rt.c
+10
-12
未找到文件。
kernel/sched_rt.c
浏览文件 @
80bf3171
...
...
@@ -576,12 +576,9 @@ static void push_rt_tasks(struct rq *rq)
static
int
pull_rt_task
(
struct
rq
*
this_rq
)
{
struct
task_struct
*
next
;
struct
task_struct
*
p
;
int
this_cpu
=
this_rq
->
cpu
,
ret
=
0
,
cpu
;
struct
task_struct
*
p
,
*
next
;
struct
rq
*
src_rq
;
int
this_cpu
=
this_rq
->
cpu
;
int
cpu
;
int
ret
=
0
;
/*
* If cpusets are used, and we have overlapping
...
...
@@ -608,23 +605,25 @@ static int pull_rt_task(struct rq *this_rq)
if
(
double_lock_balance
(
this_rq
,
src_rq
))
{
/* unlocked our runqueue lock */
struct
task_struct
*
old_next
=
next
;
next
=
pick_next_task_rt
(
this_rq
);
if
(
next
!=
old_next
)
ret
=
1
;
}
if
(
likely
(
src_rq
->
rt
.
rt_nr_running
<=
1
))
if
(
likely
(
src_rq
->
rt
.
rt_nr_running
<=
1
))
{
/*
* Small chance that this_rq->curr changed
* but it's really harmless here.
*/
rt_clear_overload
(
this_rq
);
else
}
else
{
/*
* Heh, the src_rq is now overloaded, since
* we already have the src_rq lock, go straight
* to pulling tasks from it.
*/
goto
try_pulling
;
}
spin_unlock
(
&
src_rq
->
lock
);
continue
;
}
...
...
@@ -638,6 +637,7 @@ static int pull_rt_task(struct rq *this_rq)
*/
if
(
double_lock_balance
(
this_rq
,
src_rq
))
{
struct
task_struct
*
old_next
=
next
;
next
=
pick_next_task_rt
(
this_rq
);
if
(
next
!=
old_next
)
ret
=
1
;
...
...
@@ -674,7 +674,7 @@ static int pull_rt_task(struct rq *this_rq)
*/
if
(
p
->
prio
<
src_rq
->
curr
->
prio
||
(
next
&&
next
->
prio
<
src_rq
->
curr
->
prio
))
goto
bail
;
goto
out
;
ret
=
1
;
...
...
@@ -686,9 +686,7 @@ static int pull_rt_task(struct rq *this_rq)
* case there's an even higher prio task
* in another runqueue. (low likelyhood
* but possible)
*/
/*
*
* Update next so that we won't pick a task
* on another cpu with a priority lower (or equal)
* than the one we just picked.
...
...
@@ -696,7 +694,7 @@ static int pull_rt_task(struct rq *this_rq)
next
=
p
;
}
bail
:
out
:
spin_unlock
(
&
src_rq
->
lock
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录