Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
12a05732
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
12a05732
编写于
3月 18, 2006
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] keep sync and async cfq_queue separate
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
478a82b0
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
27 addition
and
11 deletion
+27
-11
block/cfq-iosched.c
block/cfq-iosched.c
+26
-10
include/linux/blkdev.h
include/linux/blkdev.h
+1
-1
未找到文件。
block/cfq-iosched.c
浏览文件 @
12a05732
...
...
@@ -1219,11 +1219,20 @@ static void cfq_exit_single_io_context(struct cfq_io_context *cic)
spin_lock
(
q
->
queue_lock
);
if
(
unlikely
(
cic
->
cfqq
==
cfqd
->
active_queue
))
__cfq_slice_expired
(
cfqd
,
cic
->
cfqq
,
0
);
if
(
cic
->
cfqq
[
ASYNC
])
{
if
(
unlikely
(
cic
->
cfqq
[
ASYNC
]
==
cfqd
->
active_queue
))
__cfq_slice_expired
(
cfqd
,
cic
->
cfqq
[
ASYNC
],
0
);
cfq_put_queue
(
cic
->
cfqq
[
ASYNC
]);
cic
->
cfqq
[
ASYNC
]
=
NULL
;
}
if
(
cic
->
cfqq
[
SYNC
])
{
if
(
unlikely
(
cic
->
cfqq
[
SYNC
]
==
cfqd
->
active_queue
))
__cfq_slice_expired
(
cfqd
,
cic
->
cfqq
[
SYNC
],
0
);
cfq_put_queue
(
cic
->
cfqq
[
SYNC
]);
cic
->
cfqq
[
SYNC
]
=
NULL
;
}
cfq_put_queue
(
cic
->
cfqq
);
cic
->
cfqq
=
NULL
;
cic
->
key
=
NULL
;
spin_unlock
(
q
->
queue_lock
);
}
...
...
@@ -1259,7 +1268,8 @@ cfq_alloc_io_context(struct cfq_data *cfqd, gfp_t gfp_mask)
if
(
cic
)
{
INIT_LIST_HEAD
(
&
cic
->
list
);
cic
->
cfqq
=
NULL
;
cic
->
cfqq
[
ASYNC
]
=
NULL
;
cic
->
cfqq
[
SYNC
]
=
NULL
;
cic
->
key
=
NULL
;
cic
->
last_end_request
=
jiffies
;
cic
->
ttime_total
=
0
;
...
...
@@ -1325,7 +1335,12 @@ static inline void changed_ioprio(struct cfq_io_context *cic)
struct
cfq_queue
*
cfqq
;
if
(
cfqd
)
{
spin_lock
(
cfqd
->
queue
->
queue_lock
);
cfqq
=
cic
->
cfqq
;
cfqq
=
cic
->
cfqq
[
ASYNC
];
if
(
cfqq
)
{
cfq_mark_cfqq_prio_changed
(
cfqq
);
cfq_init_prio_data
(
cfqq
);
}
cfqq
=
cic
->
cfqq
[
SYNC
];
if
(
cfqq
)
{
cfq_mark_cfqq_prio_changed
(
cfqq
);
cfq_init_prio_data
(
cfqq
);
...
...
@@ -1892,6 +1907,7 @@ cfq_set_request(request_queue_t *q, struct request *rq, struct bio *bio,
struct
cfq_queue
*
cfqq
;
struct
cfq_rq
*
crq
;
unsigned
long
flags
;
int
is_sync
=
key
!=
CFQ_KEY_ASYNC
;
might_sleep_if
(
gfp_mask
&
__GFP_WAIT
);
...
...
@@ -1902,14 +1918,14 @@ cfq_set_request(request_queue_t *q, struct request *rq, struct bio *bio,
if
(
!
cic
)
goto
queue_fail
;
if
(
!
cic
->
cfqq
)
{
if
(
!
cic
->
cfqq
[
is_sync
]
)
{
cfqq
=
cfq_get_queue
(
cfqd
,
key
,
tsk
->
ioprio
,
gfp_mask
);
if
(
!
cfqq
)
goto
queue_fail
;
cic
->
cfqq
=
cfqq
;
cic
->
cfqq
[
is_sync
]
=
cfqq
;
}
else
cfqq
=
cic
->
cfqq
;
cfqq
=
cic
->
cfqq
[
is_sync
]
;
cfqq
->
allocated
[
rw
]
++
;
cfq_clear_cfqq_must_alloc
(
cfqq
);
...
...
@@ -1926,7 +1942,7 @@ cfq_set_request(request_queue_t *q, struct request *rq, struct bio *bio,
crq
->
cfq_queue
=
cfqq
;
crq
->
io_context
=
cic
;
if
(
rw
==
READ
||
process_sync
(
tsk
)
)
if
(
is_sync
)
cfq_mark_crq_is_sync
(
crq
);
else
cfq_clear_crq_is_sync
(
crq
);
...
...
include/linux/blkdev.h
浏览文件 @
12a05732
...
...
@@ -58,7 +58,7 @@ struct cfq_io_context {
* circular list of cfq_io_contexts belonging to a process io context
*/
struct
list_head
list
;
struct
cfq_queue
*
cfqq
;
struct
cfq_queue
*
cfqq
[
2
]
;
void
*
key
;
struct
io_context
*
ioc
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录