Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
4c195c8a
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
4c195c8a
编写于
2月 04, 2015
作者:
I
Ingo Molnar
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'sched/urgent' into sched/core, to merge fixes before applying new patches
Signed-off-by:
N
Ingo Molnar
<
mingo@kernel.org
>
上级
16b26943
40767b0d
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
30 addition
and
7 deletion
+30
-7
include/linux/wait.h
include/linux/wait.h
+0
-1
kernel/sched/core.c
kernel/sched/core.c
+28
-5
kernel/sched/deadline.c
kernel/sched/deadline.c
+2
-1
未找到文件。
include/linux/wait.h
浏览文件 @
4c195c8a
...
...
@@ -363,7 +363,6 @@ do { \
*/
#define wait_event_cmd(wq, condition, cmd1, cmd2) \
do { \
might_sleep(); \
if (condition) \
break; \
__wait_event_cmd(wq, condition, cmd1, cmd2); \
...
...
kernel/sched/core.c
浏览文件 @
4c195c8a
...
...
@@ -1816,6 +1816,10 @@ void __dl_clear_params(struct task_struct *p)
dl_se
->
dl_period
=
0
;
dl_se
->
flags
=
0
;
dl_se
->
dl_bw
=
0
;
dl_se
->
dl_throttled
=
0
;
dl_se
->
dl_new
=
1
;
dl_se
->
dl_yielded
=
0
;
}
/*
...
...
@@ -1844,7 +1848,7 @@ static void __sched_fork(unsigned long clone_flags, struct task_struct *p)
#endif
RB_CLEAR_NODE
(
&
p
->
dl
.
rb_node
);
hrtimer_init
(
&
p
->
dl
.
dl_timer
,
CLOCK_MONOTONIC
,
HRTIMER_MODE_REL
);
init_dl_task_timer
(
&
p
->
dl
);
__dl_clear_params
(
p
);
INIT_LIST_HEAD
(
&
p
->
rt
.
run_list
);
...
...
@@ -2054,6 +2058,9 @@ static inline int dl_bw_cpus(int i)
* allocated bandwidth to reflect the new situation.
*
* This function is called while holding p's rq->lock.
*
* XXX we should delay bw change until the task's 0-lag point, see
* __setparam_dl().
*/
static
int
dl_overflow
(
struct
task_struct
*
p
,
int
policy
,
const
struct
sched_attr
*
attr
)
...
...
@@ -3263,15 +3270,31 @@ __setparam_dl(struct task_struct *p, const struct sched_attr *attr)
{
struct
sched_dl_entity
*
dl_se
=
&
p
->
dl
;
init_dl_task_timer
(
dl_se
);
dl_se
->
dl_runtime
=
attr
->
sched_runtime
;
dl_se
->
dl_deadline
=
attr
->
sched_deadline
;
dl_se
->
dl_period
=
attr
->
sched_period
?:
dl_se
->
dl_deadline
;
dl_se
->
flags
=
attr
->
sched_flags
;
dl_se
->
dl_bw
=
to_ratio
(
dl_se
->
dl_period
,
dl_se
->
dl_runtime
);
dl_se
->
dl_throttled
=
0
;
dl_se
->
dl_new
=
1
;
dl_se
->
dl_yielded
=
0
;
/*
* Changing the parameters of a task is 'tricky' and we're not doing
* the correct thing -- also see task_dead_dl() and switched_from_dl().
*
* What we SHOULD do is delay the bandwidth release until the 0-lag
* point. This would include retaining the task_struct until that time
* and change dl_overflow() to not immediately decrement the current
* amount.
*
* Instead we retain the current runtime/deadline and let the new
* parameters take effect after the current reservation period lapses.
* This is safe (albeit pessimistic) because the 0-lag point is always
* before the current scheduling deadline.
*
* We can still have temporary overloads because we do not delay the
* change in bandwidth until that time; so admission control is
* not on the safe side. It does however guarantee tasks will never
* consume more than promised.
*/
}
/*
...
...
kernel/sched/deadline.c
浏览文件 @
4c195c8a
...
...
@@ -1094,6 +1094,7 @@ static void task_dead_dl(struct task_struct *p)
* Since we are TASK_DEAD we won't slip out of the domain!
*/
raw_spin_lock_irq
(
&
dl_b
->
lock
);
/* XXX we should retain the bw until 0-lag */
dl_b
->
total_bw
-=
p
->
dl
.
dl_bw
;
raw_spin_unlock_irq
(
&
dl_b
->
lock
);
...
...
@@ -1613,8 +1614,8 @@ static void cancel_dl_timer(struct rq *rq, struct task_struct *p)
static
void
switched_from_dl
(
struct
rq
*
rq
,
struct
task_struct
*
p
)
{
/* XXX we should retain the bw until 0-lag */
cancel_dl_timer
(
rq
,
p
);
__dl_clear_params
(
p
);
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录