aboutsummaryrefslogtreecommitdiff
path: root/include/linux/iocontext.h
AgeCommit message (Collapse)AuthorFilesLines
2010-03-12cgroups: blkio subsystem as moduleBen Blum1-1/+1
Modify the Block I/O cgroup subsystem to be able to be built as a module. As the CFQ disk scheduler optionally depends on blk-cgroup, config options in block/Kconfig, block/Kconfig.iosched, and block/blk-cgroup.h are enhanced to support the new module dependency. Signed-off-by: Ben Blum <[email protected]> Cc: Li Zefan <[email protected]> Cc: Paul Menage <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Lai Jiangshan <[email protected]> Cc: Vivek Goyal <[email protected]> Cc: Jens Axboe <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-02-26block: remove padding from io_context on 64bit buildsRichard Kennedy1-1/+1
On 64 bit builds when CONFIG_BLK_CGROUP=n (the default) this removes 8 bytes of padding from structure io_context and drops its size from 72 to 64 bytes, so needing one fewer cachelines and allowing more objects per slab in it's kmem_cache. Signed-off-by: Richard Kennedy <[email protected]> ---- patch against 2.6.33 compiled & test on x86_64 AMDX2 regards Richard Signed-off-by: Jens Axboe <[email protected]>
2010-01-11block: removed unused as_io_contextKirill Afonshin1-27/+0
It isn't used anymore, since AS was deleted. Signed-off-by: Jens Axboe <[email protected]>
2009-12-04block: Fix io_context leak after failure of clone with CLONE_IOLouis Rilling1-2/+3
With CLONE_IO, parent's io_context->nr_tasks is incremented, but never decremented whenever copy_process() fails afterwards, which prevents exit_io_context() from calling IO schedulers exit functions. Give a task_struct to exit_io_context(), and call exit_io_context() instead of put_io_context() in copy_process() cleanup path. Signed-off-by: Louis Rilling <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2009-12-03blkio: Introduce blkio controller cgroup interfaceVivek Goyal1-0/+4
o This is basic implementation of blkio controller cgroup interface. This is the common interface visible to user space and should be used by different IO control policies as we implement those. Signed-off-by: Vivek Goyal <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2009-10-26cfq: calculate the seek_mean per cfq_queue not per cfq_io_contextJeff Moyer1-5/+0
async cfq_queue's are already shared between processes within the same priority, and forthcoming patches will change the mapping of cic to sync cfq_queue from 1:1 to 1:N. So, calculate the seekiness of a process based on the cfq_queue instead of the cfq_io_context. Signed-off-by: Jeff Moyer <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2009-07-31io context: fix ref countingLi Zefan1-1/+1
Commit d9c7d394a8ebacb60097b192939ae9f15235225e ("block: prevent possible io_context->refcount overflow") mistakenly changed atomic_inc(&ioc->nr_tasks) to atomic_long_inc(&ioc->refcount). Signed-off-by: Li Zefan <[email protected]> Acked-by: Nikanth Karthikesan <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2009-06-10block: prevent possible io_context->refcount overflowNikanth Karthikesan1-3/+3
Currently io_context has an atomic_t(32-bit) as refcount. In the case of cfq, for each device against whcih a task does I/O, a reference to the io_context would be taken. And when there are multiple process sharing io_contexts(CLONE_IO) would also have a reference to the same io_context. Theoretically the possible maximum number of processes sharing the same io_context + the number of disks/cfq_data referring to the same io_context can overflow the 32-bit counter on a very high-end machine. Even though it is an improbable case, let us make it atomic_long_t. Signed-off-by: Nikanth Karthikesan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2008-07-03block: blkdev.h cleanup, move iocontext stuff to iocontext.hJens Axboe1-0/+18
Signed-off-by: Jens Axboe <[email protected]>
2008-04-15io context: increment task attachment count in ioc_task_link()Jens Axboe1-1/+3
Thanks to Nikanth Karthikesan <[email protected]> for reporting this. Signed-off-by: Jens Axboe <[email protected]>
2008-04-02cfq-iosched: fix rcu freeing of cfq io contextsFabio Checconi1-0/+3
SLAB_DESTROY_BY_RCU is not a direct substitute for normal call_rcu() freeing, since it'll page freeing but NOT object freeing. So change cfq to do the freeing on its own. Signed-off-by: Fabio Checconi <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
2008-02-19cfq-iosched: add hlist for browsing parallel to the radix treeJens Axboe1-0/+2
It's cumbersome to browse a radix tree from start to finish, especially since we modify keys when a process exits. So add a hlist for the single purpose of browsing over all known cfq_io_contexts, used for exit, io prio change, etc. This fixes http://bugzilla.kernel.org/show_bug.cgi?id=9948 Signed-off-by: Jens Axboe <[email protected]>
2008-01-28block: cfq: make the io contect sharing locklessJens Axboe1-2/+4
The io context sharing introduced a per-ioc spinlock, that would protect the cfq io context lookup. That is a regression from the original, since we never needed any locking there because the ioc/cic were process private. The cic lookup is changed from an rbtree construct to a radix tree, which we can then use RCU to make the reader side lockless. That is the performance critical path, modifying the radix tree is only done on process creation (when that process first does IO, actually) and on process exit (if that process has done IO). As it so happens, radix trees are also much faster for this type of lookup where the key is a pointer. It's a very sparse tree. Signed-off-by: Jens Axboe <[email protected]>
2008-01-28io context sharing: preliminary supportJens Axboe1-4/+18
Detach task state from ioc, instead keep track of how many processes are accessing the ioc. Signed-off-by: Jens Axboe <[email protected]>
2008-01-28ioprio: move io priority from task_struct to io_contextJens Axboe1-0/+79
This is where it belongs and then it doesn't take up space for a process that doesn't do IO. Signed-off-by: Jens Axboe <[email protected]>