I/O context isolation
Subsystems (2)
Jens,
Here's ff1 patchset to have generic I/O context.
ff1 : Export io context operations from blkdev/ll_rw_blk (ok) ff2 : Make io_context generic plateform by importing IO stuff from as_io.
AFAICS, cfq_queue for instance could disappear when using io_context
but I think elv_data should remain elevator side....
I don't want to go in the wild here so if you've got suggestions, don't hesitate ;)
Regards,
FabF
Changelog +5 -0
@@ -0,0 +1,5 @@ +2.6.6-mm4-ff1 +------------- +Guideline : io/scheduler redesign + +> Extract io_context operations & ds from blkdev (FabF)
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 6 -EXTRAVERSION = -mm4 +EXTRAVERSION = -mm4ff1 NAME=Zonked Quokka # *DOCUMENTATION*
Todo +4 -0
@@ -0,0 +1,4 @@ + +< Extract as_io_context from blkdev.h +< Documentation synch +
drivers/block/Makefile +1 -1
@@ -13,7 +13,7 @@ # kblockd threads # -obj-y := elevator.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o +obj-y := elevator.o io_context.o ll_rw_blk.o ioctl.o genhd.o scsi_ioctl.o obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o obj-$(CONFIG_IOSCHED_AS) += as-iosched.o
drivers/block/as-iosched.c +1 -0
@@ -9,6 +9,7 @@*/ #include <linux/kernel.h> #include <linux/fs.h> +#include <linux/io_context.h> #include <linux/blkdev.h> #include <linux/elevator.h> #include <linux/bio.h>
drivers/block/io_context.c +114 -0
114 lines not on this page · raw message
drivers/block/ll_rw_blk.c +2 -135
173 lines not on this page · raw message
include/linux/blkdev.h +2 -50
58 lines not on this page · raw message
include/linux/io_context.h +84 -0
84 lines not on this page · raw message
Quoted 7 lines · FabF
Jens,
Here's ff1 patchset to have generic I/O context.
ff1 : Export io context operations from blkdev/ll_rw_blk (ok) ff2 : Makeio_contextgeneric plateform by importing IO stuff fromas_io.
Can I just ask why you want as_io_context in generic code? It is currently nicely hidden away in as-iosched.c where nobody else needs to ever see it.
Quoted 5 lines
AFAICS,
cfq_queuefor instance could disappear when usingio_context
but I thinkelv_datashould remain elevator side....
I don't want to go in the wild here so if you've got suggestions, don't hesitate ;)
cfq_queue is per-queue-per-process. io_context is just per-process, so it isn't a trivial replacement.
Nick
Quoted 9 lines · Nick Piggin
Quoted 7 lines · FabF
Jens,
Here's ff1 patchset to have generic I/O context.
ff1 : Export io context operations from blkdev/ll_rw_blk (ok) ff2 : Makeio_contextgeneric plateform by importing IO stuff fromas_io.
Quoted 3 lines
Can I just ask why you want
as_io_contextin generic code? It is currently nicely hidden away inas-iosched.cwhere nobody else needs to ever see it.
I do want I/O context to be generic not the whole as_io. That export should bring:
-All elevators to use io_context -source tree to be more self-explanatory -have a stronger elevator interface
Quoted 9 lines
Quoted 6 lines
AFAICS,
cfq_queuefor instance could disappear when usingio_context
but I thinkelv_datashould remain elevator side....
I don't want to go in the wild here so if you've got suggestions, don't hesitate ;)
cfq_queueis per-queue-per-process.io_contextis just per-process, so it isn't a trivial replacement.
But I guess we can merge that stuff to have "a one way, one place" code rather than repeat code in all elv.
Regards,
FabF
Quoted 10 lines · FabF
Quoted 9 lines · Nick Piggin
Quoted 7 lines · FabF
Jens,
Here's ff1 patchset to have generic I/O context.
ff1 : Export io context operations from blkdev/ll_rw_blk (ok) ff2 : Makeio_contextgeneric plateform by importing IO stuff fromas_io.
Quoted 6 lines
Quoted 3 lines
Can I just ask why you want
as_io_contextin generic code? It is currently nicely hidden away inas-iosched.cwhere nobody else needs to ever see it.I do want I/O context to be generic not the whole
as_io. That export should bring:
-All elevators to useio_context
For?
Quoted 2 lines
-source tree to be more self-explanatory
-have a stronger elevator interface
Those aren't real arguments :-)
Quoted 10 lines
Quoted 8 lines
Quoted 5 lines
AFAICS,
cfq_queuefor instance could disappear when usingio_context
but I thinkelv_datashould remain elevator side....
I don't want to go in the wild here so if you've got suggestions, don't hesitate ;)
cfq_queueis per-queue-per-process.io_contextis just per-process, so it isn't a trivial replacement.But I guess we can merge that stuff to have "a one way, one place" code rather than repeat code in all elv.
That's another pit fall, don't design for a need that isn't there. Using io contexts in cfq does not get any easier with the code moved to iocontext.c file, it's fine where it is.
Signature · 1 line
Jens Axboe
Quoted 11 lines · Jens Axboe
Quoted 10 lines · FabF
Quoted 9 lines · Nick Piggin
Quoted 7 lines · FabF
Jens,
Here's ff1 patchset to have generic I/O context.
ff1 : Export io context operations from blkdev/ll_rw_blk (ok) ff2 : Makeio_contextgeneric plateform by importing IO stuff fromas_io.
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Can I just ask why you want
as_io_contextin generic code? It is currently nicely hidden away inas-iosched.cwhere nobody else needs to ever see it.I do want I/O context to be generic not the whole
as_io. That export should bring:
-All elevators to useio_contextFor?
Well I was completely wrong :( ll_rw_blk uses i/o context all over the place so all elv do as well ... You're right Jens, the only good thing to do there would be to extract anticipation.
Regards,
FabF
Quoted 16 lines · FabF
Quoted 10 lines · Nick Piggin
Quoted 7 lines · FabF
Jens,
Here's ff1 patchset to have generic I/O context.
ff1 : Export io context operations from blkdev/ll_rw_blk (ok) ff2 : Makeio_contextgeneric plateform by importing IO stuff fromas_io.Quoted 3 lines
Can I just ask why you want
as_io_contextin generic code? It is currently nicely hidden away inas-iosched.cwhere nobody else needs to ever see it.
Quoted 6 lines
I do want I/O context to be generic not the whole
as_io. That export should bring:
-All elevators to useio_context-source tree to be more self-explanatory -have a stronger elevator interface
Sorry, my mistake. as_io_context is not nicely hidden away at the moment. I can't remember why, I think it is only needed for the declaration... I'll look into moving it into as-iosched.c
*But*, io_context is already exported to all elevators and generic code.
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
AFAICS,
cfq_queuefor instance could disappear when usingio_context
but I thinkelv_datashould remain elevator side....
I don't want to go in the wild here so if you've got suggestions, don't hesitate ;)
Quoted 6 lines
Quoted 2 lines
cfq_queueis per-queue-per-process.io_contextis just per-process, so it isn't a trivial replacement.But I guess we can merge that stuff to have "a one way, one place" code rather than repeat code in all elv.
I quite like things how they sit right now. The io_context thing is quite generic so that is fine... CFQ's cfq_queue is fairly specialised and trying to make it generic is not a very good idea, especially as no other elevators would make use of it.
Quoted 24 lines · Nick Piggin
Quoted 16 lines · FabF
Quoted 10 lines · Nick Piggin
Quoted 7 lines · FabF
Jens,
Here's ff1 patchset to have generic I/O context.
ff1 : Export io context operations from blkdev/ll_rw_blk (ok) ff2 : Makeio_contextgeneric plateform by importing IO stuff fromas_io.Quoted 3 lines
Can I just ask why you want
as_io_contextin generic code? It is currently nicely hidden away inas-iosched.cwhere nobody else needs to ever see it.Quoted 6 lines
I do want I/O context to be generic not the whole
as_io. That export should bring:
-All elevators to useio_context-source tree to be more self-explanatory -have a stronger elevator interface
Quoted 6 lines
Sorry, my mistake.
as_io_contextis not nicely hidden away at the moment. I can't remember why, I think it is only needed for the declaration... I'll look into moving it intoas-iosched.c*But*,
io_contextis already exported to all elevators and generic code.
Well ff1 does that "concept split".We have
-Elevator
-Elevator interface
-I/O context
-Block management
As none of you seems OK with further changes, I'll stop my effort right here but keep thinking ff1 is good :)
Regards,
FabF
Quoted 24 lines · Nick Piggin
Quoted 16 lines · FabF
Quoted 10 lines · Nick Piggin
Quoted 7 lines · FabF
Jens,
Here's ff1 patchset to have generic I/O context.
ff1 : Export io context operations from blkdev/ll_rw_blk (ok) ff2 : Makeio_contextgeneric plateform by importing IO stuff fromas_io.Quoted 3 lines
Can I just ask why you want
as_io_contextin generic code? It is currently nicely hidden away inas-iosched.cwhere nobody else needs to ever see it.Quoted 6 lines
I do want I/O context to be generic not the whole
as_io. That export should bring:
-All elevators to useio_context-source tree to be more self-explanatory -have a stronger elevator interface
Quoted 6 lines
Sorry, my mistake.
as_io_contextis not nicely hidden away at the moment. I can't remember why, I think it is only needed for the declaration... I'll look into moving it intoas-iosched.c*But*,
io_contextis already exported to all elevators and generic code.
That was my initial complaint about it as well, however solving it makes it even more ugly I think. It's a layering violation. I guess with a simply ->dtor and ->exit + io_private_data it would be fine, but I'd say don't bother now (it's 2.6.6).
Signature · 1 line
Jens Axboe
Quoted 9 lines · Nick Piggin
Quoted 7 lines · FabF
Jens,
Here's ff1 patchset to have generic I/O context.
ff1 : Export io context operations from blkdev/ll_rw_blk (ok) ff2 : Makeio_contextgeneric plateform by importing IO stuff fromas_io.
Quoted 3 lines
Can I just ask why you want
as_io_contextin generic code? It is currently nicely hidden away inas-iosched.cwhere nobody else needs to ever see it.
I think (it's the only reason I can think of) that he is trying to make the anticipation generic. Am I correct?
Quoted 8 lines
Quoted 5 lines
AFAICS,
cfq_queuefor instance could disappear when usingio_context
but I thinkelv_datashould remain elevator side....
I don't want to go in the wild here so if you've got suggestions, don't hesitate ;)
cfq_queueis per-queue-per-process.io_contextis just per-process, so it isn't a trivial replacement.
Definitely not, I struggled quite a bit with such a transformation in cfq + ioprio.
Signature · 1 line
Jens Axboe