LKML Archive on
help / color / mirror / Atom feed
* [PATCH 0/6 v4] cfq-iosched: Introduce CFQ group hierarchical scheduling and "use_hierarchy" interface
@ 2011-02-10  7:45 Gui Jianfeng
  2011-02-10 18:30 ` Vivek Goyal
  0 siblings, 1 reply; 7+ messages in thread
From: Gui Jianfeng @ 2011-02-10  7:45 UTC (permalink / raw)
  To: Vivek Goyal, Jens Axboe
  Cc: Shaohua Li, lkml, Chad Talbott, Divyesh Shah, Gui Jianfeng


Previously, I posted a patchset to add support of CFQ group hierarchical scheduling
in the way that it puts all CFQ queues in a hidden group and schedules with other 
CFQ group under their parent. The patchset is available here,

Vivek think this approach isn't so instinct that we should treat CFQ queues
and groups at the same level. Here is the new approach for hierarchical 
scheduling based on Vivek's suggestion. The most big change of CFQ is that
it gets rid of cfq_slice_offset logic, and makes use of vdisktime for CFQ
queue scheduling just like CFQ group does. But I still give cfqq some jump 
in vdisktime based on ioprio, thanks for Vivek to point out this. Now CFQ 
queue and CFQ group use the same scheduling algorithm. 

"use_hierarchy" interface is now added to switch between hierarchical mode
and flat mode. It works as memcg.

V3 -> V4 Changes:
- Take io class into account when calculating the boost value.
- Refine the vtime boosting logic as Vivek's Suggestion.
- Make the calculation of group slice cross all service trees under a group.
- Modify Documentation in terms of Vivek's comments.

V2 -> V3 Changes:
- Starting from cfqd->grp_service_tree for both hierarchical mode and flat mode
- Avoid recursion when allocating cfqg and force dispatch logic
- Fix a bug when boosting vdisktime
- Adjusting total_weight accordingly when changing weight
- Change group slice calculation into a hierarchical way
- Keep flat mode rather than deleting it first then adding it later
- kfree the parent cfqg if there nobody references to it
- Simplify select_queue logic by using some wrap function
- Make "use_hierarchy" interface work as memcg
- Make use of time_before() for vdisktime compare
- Update Document
- Fix some code style problems

V1 -> V2 Changes:
- Raname "struct io_sched_entity" to "struct cfq_entity" and don't differentiate
  queue_entity and group_entity, just use cfqe instead. 
- Give newly added cfqq a small vdisktime jump accord to its ioprio.
- Make flat mode as default CFQ group scheduling mode.
- Introduce "use_hierarchy" interface.
- Update blkio cgroup documents

I did some benchmarks by fio, I didn't see performance drop for throughtput or latency.
log is attached.

[PATCH 1/6 v4] cfq-iosched: Introduce cfq_entity for CFQ queue
[PATCH 2/6 v4] cfq-iosched: Introduce cfq_entity for CFQ group
[PATCH 3/6 v4] cfq-iosched: Introduce vdisktime and io weight for CFQ queue
[PATCH 4/6 v4] cfq-iosched: Extract some common code of service tree handling for CFQ queue and CFQ group
[PATCH 5/6 v4] cfq-iosched: CFQ group hierarchical scheduling and use_hierarchy interface
[PATCH 6/6 v4] blkio-cgroup: Document for blkio.use_hierarchy interface

 Documentation/cgroups/blkio-controller.txt |   81 +-
 block/blk-cgroup.c                         |   61 +
 block/blk-cgroup.h                         |    3
 block/cfq-iosched.c                        |  968 ++++++++++++++++++++--------


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-15 14:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10  7:45 [PATCH 0/6 v4] cfq-iosched: Introduce CFQ group hierarchical scheduling and "use_hierarchy" interface Gui Jianfeng
2011-02-10 18:30 ` Vivek Goyal
2011-02-11  9:58   ` Gui Jianfeng
2011-02-12  6:08   ` Gui Jianfeng
2011-02-14 18:06     ` Vivek Goyal
2011-02-15  3:13       ` Gui Jianfeng
2011-02-15 14:29         ` Vivek Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).