linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHSET block:for-3.2/core] cleanup io_context interface
@ 2011-10-29 23:49 Tejun Heo
  2011-10-29 23:49 ` [PATCH 01/10] block, cfq: replace current_io_context() with create_io_context() Tejun Heo
                   ` (10 more replies)
  0 siblings, 11 replies; 18+ messages in thread
From: Tejun Heo @ 2011-10-29 23:49 UTC (permalink / raw)
  To: axboe, vgoyal; +Cc: ctalbott, rni, linux-kernel

Hello,

Over time, cfq and io_context has grown into each other and currently
it isn'tq clear which part belongs where.  Some of cfq internals live
in io_context code and vice-versa.  This makes the code error-prone,
difficult to understand.

With locking simplified, io_context interface can be cleaned up now.
This patchset moves bulk of io_cq management from cfq to block core.
This provides clean separation between iosched algorithm
implementation and ioc / ioc-q association (icq, formerly cic's)
management which is a bit complex due to the locking requirements.

Elevators now can simply set .icq_size and align in elevator_type and
block layer will automatically manage icq's and guarantee correct
behavior across ioc, q exits and elevator switches.

Comments are added to iocontext.h to explain the rules for using icq.

 0001-block-cfq-replace-current_io_context-with-create_io_.patch
 0002-block-reorder-elevator-switch-sequence.patch
 0003-block-remove-elevator_queue-ops.patch
 0004-block-cfq-reorganize-cfq_io_context-into-generic-and.patch
 0005-block-cfq-move-cfqd-icq_list-to-request_queue-and-ad.patch
 0006-block-cfq-move-io_cq-lookup-to-blk-ioc.c.patch
 0007-block-cfq-move-icq-cache-management-to-block-core.patch
 0008-block-cfq-move-io_cq-exit-release-to-blk-ioc.c.patch
 0009-block-cfq-restructure-io_cq-creation-path-for-io_con.patch
 0010-block-cfq-move-icq-creation-and-rq-elv.icq-associati.patch

This patchset is on top of

  block:for-3.2/core 334c2b0b8b "blk-throttle: use queue_is_locked() instead..."
+ [1] patchset "further updates to blk_cleanup_queue(), take#2"
+ [2] patchset "rescue cfq from RCU death spiral"

and available in the following git branch.

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/misc.git block-ioc

Jens, this patchset is the last of io_context related updates;
however, as I wrote earlier, I'm thinking about doing similar updates
to blkcg code which has basically the same issues.  I'll wait for
reviews on the pending patchsets and then proceed.

diffstat follows.  Added lines are from comments.  Without them total
LOC is negative.

 block/blk-core.c          |   72 ++++++--
 block/blk-ioc.c           |  282 ++++++++++++++++++++++---------
 block/blk-sysfs.c         |    6 
 block/blk.h               |   49 ++++-
 block/cfq-iosched.c       |  408 +++++++++++-----------------------------------
 block/deadline-iosched.c  |    4 
 block/elevator.c          |  203 ++++++++++++----------
 block/noop-iosched.c      |    4 
 include/linux/blkdev.h    |   10 -
 include/linux/elevator.h  |   23 ++
 include/linux/iocontext.h |  114 +++++++++---
 11 files changed, 630 insertions(+), 545 deletions(-)

Thank you.

--
tejun

[1] http://thread.gmane.org/gmane.linux.kernel/1207608
[2] http://thread.gmane.org/gmane.linux.kernel/1207624

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

end of thread, other threads:[~2011-11-14 17:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-29 23:49 [PATCHSET block:for-3.2/core] cleanup io_context interface Tejun Heo
2011-10-29 23:49 ` [PATCH 01/10] block, cfq: replace current_io_context() with create_io_context() Tejun Heo
2011-10-29 23:49 ` [PATCH 02/10] block: reorder elevator switch sequence Tejun Heo
2011-10-29 23:49 ` [PATCH 03/10] block: remove elevator_queue->ops Tejun Heo
2011-10-29 23:49 ` [PATCH 04/10] block, cfq: reorganize cfq_io_context into generic and cfq specific parts Tejun Heo
2011-10-29 23:49 ` [PATCH 05/10] block, cfq: move cfqd->icq_list to request_queue and add request->elv.icq Tejun Heo
2011-10-29 23:49 ` [PATCH 06/10] block, cfq: move io_cq lookup to blk-ioc.c Tejun Heo
2011-10-29 23:49 ` [PATCH 07/10] block, cfq: move icq cache management to block core Tejun Heo
2011-10-29 23:49 ` [PATCH 08/10] block, cfq: move io_cq exit/release to blk-ioc.c Tejun Heo
2011-10-29 23:49 ` [PATCH 09/10] block, cfq: restructure io_cq creation path for io_context interface cleanup Tejun Heo
2011-10-29 23:49 ` [PATCH 10/10] block, cfq: move icq creation and rq->elv.icq association to block core Tejun Heo
2011-11-03 15:08 ` [PATCHSET block:for-3.2/core] cleanup io_context interface Tejun Heo
2011-11-04  9:16   ` Jens Axboe
2011-11-04 14:22     ` Tejun Heo
2011-11-04 14:29       ` Jens Axboe
2011-11-14 17:40         ` Tejun Heo
2011-11-14 17:52           ` Jens Axboe
2011-11-14 17:58             ` Tejun Heo

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).