From: Tejun Heo <tj@kernel.org>
To: axboe@kernel.dk, vgoyal@redhat.com
Cc: ctalbott@google.com, rni@google.com, linux-kernel@vger.kernel.org
Subject: [PATCHSET block:for-3.2/core] cleanup io_context interface
Date: Sat, 29 Oct 2011 16:49:37 -0700 [thread overview]
Message-ID: <1319932187-7631-1-git-send-email-tj@kernel.org> (raw)
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
next reply other threads:[~2011-10-29 23:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-29 23:49 Tejun Heo [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1319932187-7631-1-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--cc=axboe@kernel.dk \
--cc=ctalbott@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rni@google.com \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.