Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
ae298c98
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ae298c98
编写于
8月 21, 2006
作者:
G
Greg Kroah-Hartman
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-linus' of
git://brick.kernel.dk/data/git/linux-2.6-block
上级
da547d77
be33c3a6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
25 deletion
+32
-25
block/cfq-iosched.c
block/cfq-iosched.c
+1
-1
block/ll_rw_blk.c
block/ll_rw_blk.c
+2
-0
fs/ioprio.c
fs/ioprio.c
+28
-2
include/linux/ioprio.h
include/linux/ioprio.h
+1
-22
未找到文件。
block/cfq-iosched.c
浏览文件 @
ae298c98
...
...
@@ -1561,7 +1561,7 @@ cfq_cic_link(struct cfq_data *cfqd, struct io_context *ioc,
/* ->key must be copied to avoid race with cfq_exit_queue() */
k
=
__cic
->
key
;
if
(
unlikely
(
!
k
))
{
cfq_drop_dead_cic
(
ioc
,
cic
);
cfq_drop_dead_cic
(
ioc
,
__
cic
);
goto
restart
;
}
...
...
block/ll_rw_blk.c
浏览文件 @
ae298c98
...
...
@@ -3628,6 +3628,8 @@ struct io_context *current_io_context(gfp_t gfp_flags)
ret
->
nr_batch_requests
=
0
;
/* because this is 0 */
ret
->
aic
=
NULL
;
ret
->
cic_root
.
rb_node
=
NULL
;
/* make sure set_task_ioprio() sees the settings above */
smp_wmb
();
tsk
->
io_context
=
ret
;
}
...
...
fs/ioprio.c
浏览文件 @
ae298c98
...
...
@@ -44,6 +44,9 @@ static int set_task_ioprio(struct task_struct *task, int ioprio)
task
->
ioprio
=
ioprio
;
ioc
=
task
->
io_context
;
/* see wmb() in current_io_context() */
smp_read_barrier_depends
();
if
(
ioc
&&
ioc
->
set_ioprio
)
ioc
->
set_ioprio
(
ioc
,
ioprio
);
...
...
@@ -111,9 +114,9 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
continue
;
ret
=
set_task_ioprio
(
p
,
ioprio
);
if
(
ret
)
break
;
goto
free_uid
;
}
while_each_thread
(
g
,
p
);
free_uid:
if
(
who
)
free_uid
(
user
);
break
;
...
...
@@ -137,6 +140,29 @@ static int get_task_ioprio(struct task_struct *p)
return
ret
;
}
int
ioprio_best
(
unsigned
short
aprio
,
unsigned
short
bprio
)
{
unsigned
short
aclass
=
IOPRIO_PRIO_CLASS
(
aprio
);
unsigned
short
bclass
=
IOPRIO_PRIO_CLASS
(
bprio
);
if
(
!
ioprio_valid
(
aprio
))
return
bprio
;
if
(
!
ioprio_valid
(
bprio
))
return
aprio
;
if
(
aclass
==
IOPRIO_CLASS_NONE
)
aclass
=
IOPRIO_CLASS_BE
;
if
(
bclass
==
IOPRIO_CLASS_NONE
)
bclass
=
IOPRIO_CLASS_BE
;
if
(
aclass
==
bclass
)
return
min
(
aprio
,
bprio
);
if
(
aclass
>
bclass
)
return
bprio
;
else
return
aprio
;
}
asmlinkage
long
sys_ioprio_get
(
int
which
,
int
who
)
{
struct
task_struct
*
g
,
*
p
;
...
...
include/linux/ioprio.h
浏览文件 @
ae298c98
...
...
@@ -59,27 +59,6 @@ static inline int task_nice_ioprio(struct task_struct *task)
/*
* For inheritance, return the highest of the two given priorities
*/
static
inline
int
ioprio_best
(
unsigned
short
aprio
,
unsigned
short
bprio
)
{
unsigned
short
aclass
=
IOPRIO_PRIO_CLASS
(
aprio
);
unsigned
short
bclass
=
IOPRIO_PRIO_CLASS
(
bprio
);
if
(
!
ioprio_valid
(
aprio
))
return
bprio
;
if
(
!
ioprio_valid
(
bprio
))
return
aprio
;
if
(
aclass
==
IOPRIO_CLASS_NONE
)
aclass
=
IOPRIO_CLASS_BE
;
if
(
bclass
==
IOPRIO_CLASS_NONE
)
bclass
=
IOPRIO_CLASS_BE
;
if
(
aclass
==
bclass
)
return
min
(
aprio
,
bprio
);
if
(
aclass
>
bclass
)
return
bprio
;
else
return
aprio
;
}
extern
int
ioprio_best
(
unsigned
short
aprio
,
unsigned
short
bprio
);
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录