- 01 Feb, 2008 2 commits
-
-
Jens Axboe authored
It blindly copies everything in the io_context, including the lock. That doesn't work so well for either lock ordering or lockdep. There seems zero point in swapping io contexts on a request to request merge, so the best point of action is to just remove it. Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
Jens Axboe authored
Since it's acquired from irq context, all locking must be of the irq safe variant. Most are already inside the queue lock (which already disables interrupts), but the io scheduler rmmod path always has irqs enabled and the put_io_context() path may legally be called with irqs enabled (even if it isn't usually). So fixup those two. Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 30 Jan, 2008 1 commit
-
-
Jens Axboe authored
If the two requests belong to the same io context, we will attempt to lock the same lock twice. But swapping contexts is pointless in that case, so just check for rioc == nioc before doing the double lock and copy. Tested-by:
Olof Johansson <olof@lixom.net> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 28 Jan, 2008 1 commit
-
-
Jens Axboe authored
changes to anticipatory io scheduler for io_context sharing Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 18 Dec, 2007 3 commits
-
-
Adrian Bunk authored
elv_register() always returns 0, and there isn't anything it does where it should return an error (the only error condition is so grave that it's handled with a BUG_ON). Signed-off-by:
Adrian Bunk <bunk@kernel.org> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
Aaron Carroll authored
New write batches currently start from where the last one completed. We have no idea where the head is after switching batches, so this makes little sense. Instead, start the next batch from the request with the earliest deadline in the hope that we avoid a deadline expiry later on. Signed-off-by:
Aaron Carroll <aaronc@gelato.unsw.edu.au> Acked-by:
Nick Piggin <npiggin@suse.de> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
Aaron Carroll authored
Two comments refer to deadlines applying to reads only. This is not the case. Signed-off-by:
Aaron Carroll <aaronc@gelato.unsw.edu.au> Acked-by:
Nick Piggin <npiggin@suse.de> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 24 Jul, 2007 1 commit
-
-
Jens Axboe authored
Some of the code has been gradually transitioned to using the proper struct request_queue, but there's lots left. So do a full sweet of the kernel and get rid of this typedef and replace its uses with the proper type. Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 17 Jul, 2007 1 commit
-
-
Christoph Lameter authored
kmalloc_node() and kmem_cache_alloc_node() were not available in a zeroing variant in the past. But with __GFP_ZERO it is possible now to do zeroing while allocating. Use __GFP_ZERO to remove the explicit clearing of memory via memset whereever we can. Signed-off-by:
Christoph Lameter <clameter@sgi.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 09 May, 2007 1 commit
-
-
Andrew Morton authored
Switch the kblockd flushing from a global flush to a more specific flush_work(). (akpm: bypassed maintainers, sorry. There are other patches which depend on this) Cc: "Maciej W. Rozycki" <macro@linux-mips.org> Cc: David Howells <dhowells@redhat.com> Cc: Jens Axboe <axboe@suse.de> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: Oleg Nesterov <oleg@tv-sign.ru> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 08 May, 2007 1 commit
-
-
Nick Piggin authored
Fix units mismatch (jiffies vs msecs) in as-iosched.c, spotted by Xiaoning Ding <dingxn@cse.ohio-state.edu>. Signed-off-by:
Nick Piggin <npiggin@suse.de> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
-
- 13 Dec, 2006 1 commit
-
-
Jens Axboe authored
We implemented the missing bits to allow this some time ago, and they are integrated in AS. So remove the __module_get() to allow the module to be unloaded. Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 01 Dec, 2006 1 commit
-
-
Jens Axboe authored
- ->init_queue() does not need the elevator passed in - ->put_request() is a hot path and need not have the queue passed in - cfq_update_io_seektime() does not need cfqd passed in Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>
-
- 22 Nov, 2006 1 commit
-
-
David Howells authored
Pass the work_struct pointer to the work function rather than context data. The work function can use container_of() to work out the data. For the cases where the container of the work_struct may go away the moment the pending bit is cleared, it is made possible to defer the release of the structure by deferring the clearing of the pending bit. To make this work, an extra flag is introduced into the management side of the work_struct. This governs auto-release of the structure upon execution. Ordinarily, the work queue executor would release the work_struct for further scheduling or deallocation by clearing the pending bit prior to jumping to the work function. This means that, unless the driver makes some guarantee itself that the work_struct won't go away, the work function may not access anything else in the work_struct or its container lest they be deallocated.. This is a problem if the auxiliary data is taken away (as done by the last patch). However, if the pending bit is *not* cleared before jumping to the work function, then the work function *may* access the work_struct and its container with no problems. But then the work function must itself release the work_struct by calling work_release(). In most cases, automatic release is fine, so this is the default. Special initiators exist for the non-auto-release case (ending in _NAR). Signed-Off-By:
David Howells <dhowells@redhat.com>
-
- 01 Oct, 2006 1 commit
-
-
Peter Zijlstra authored
All on stack DECLARE_COMPLETIONs should be replaced by: DECLARE_COMPLETION_ONSTACK Signed-off-by:
Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by:
Ingo Molnar <mingo@elte.hu> Acked-by:
Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by:
Andrew Morton <akpm@osdl.org> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 30 Sep, 2006 12 commits
-
-
Jens Axboe authored
As people often look for the copyright in files to see who to mail, update the link to a neutral one. Signed-off-by:
Jens Axboe <axboe@kernel.dk>
-
Jens Axboe authored
CFQ implements this on its own now, but it's really block layer knowledge. Tells a device queue to start dispatching requests to the driver, taking care to unplug if needed. Also fixes the issue where as/cfq will invoke a stopped queue, which we really don't want. Signed-off-by:
Jens Axboe <axboe@suse.de>
-
Jens Axboe authored
Some were kmalloc_node(), some were still kmalloc(). Change them all to kmalloc_node(). Signed-off-by:
Jens Axboe <axboe@suse.de>
-
Jens Axboe authored
It's ok if the read path is a lot more costly, as long as inc/dec is really cheap. The inc/dec will happen for each created/freed io context, while the reading only happens when a disk queue exits. Signed-off-by:
Jens Axboe <axboe@suse.de>
-
Jens Axboe authored
It's not needed for anything, so kill the bio passing. Signed-off-by:
Jens Axboe <axboe@suse.de>
-
Jens Axboe authored
Get rid of the as_rq request type. With the added elevator_private2, we have enough room in struct request to get rid of any arq allocation/free for each request. Signed-off-by:
Jens Axboe <axboe@suse.de> Signed-off-by:
Nick Piggin <npiggin@suse.de>
-
Jens Axboe authored
We can track this in struct request. Signed-off-by:
Jens Axboe <axboe@suse.de> Signed-off-by:
Nick Piggin <npiggin@suse.de>
-
Jens Axboe authored
Saves some space in arq. Signed-off-by:
Jens Axboe <axboe@suse.de> Signed-off-by:
Nick Piggin <npiggin@suse.de>
-
Jens Axboe authored
This removes the rbtree handling from AS. Signed-off-by:
Jens Axboe <axboe@suse.de> Signed-off-by:
Nick Piggin <npiggin@suse.de>
-
Jens Axboe authored
The conditions got reserved. Also make rb_next() and rb_prev() check for the empty condition. Signed-off-by:
Jens Axboe <axboe@suse.de>
-
Jens Axboe authored
Right now, every IO scheduler implements its own backmerging (except for noop, which does no merging). That results in duplicated code for essentially the same operation, which is never a good thing. This patch moves the backmerging out of the io schedulers and into the elevator core. We save 1.6kb of text and as a bonus get backmerging for noop as well. Win-win! Signed-off-by:
Jens Axboe <axboe@suse.de>
-
Jens Axboe authored
Right now ->flags is a bit of a mess: some are request types, and others are just modifiers. Clean this up by splitting it into ->cmd_type and ->cmd_flags. This allows introduction of generic Linux block message types, useful for sending generic Linux commands to block devices. Signed-off-by:
Jens Axboe <axboe@suse.de>
-
- 30 Jun, 2006 1 commit
-
-
Jörn Engel authored
Signed-off-by:
Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by:
Adrian Bunk <bunk@stusta.de>
-
- 26 Jun, 2006 1 commit
-
-
Andreas Mohr authored
acquired (aquired) contiguous (contigious) successful (succesful, succesfull) surprise (suprise) whether (weather) some other misspellings Signed-off-by:
Andreas Mohr <andi@lisas.de> Signed-off-by:
Adrian Bunk <bunk@stusta.de>
-
- 23 Jun, 2006 3 commits
-
-
Jens Axboe authored
They all duplicate macros to check for empty root and/or node, and clearing a node. So put those in rbtree.h. Signed-off-by:
Jens Axboe <axboe@suse.de>
-
Jens Axboe authored
A process flag to indicate whether we are doing sync io is incredibly ugly. It also causes performance problems when one does a lot of async io and then proceeds to sync it. Part of the io will go out as async, and the other part as sync. This causes a disconnect between the previously submitted io and the synced io. For io schedulers such as CFQ, this will cause us lost merges and suboptimal behaviour in scheduling. Remove PF_SYNCWRITE completely from the fsync/msync paths, and let the O_DIRECT path just directly indicate that the writes are sync by using WRITE_SYNC instead. Signed-off-by:
Jens Axboe <axboe@suse.de>
-
Akinobu Mita authored
Use hlist instead of list_head for request hashtable in deadline-iosched and as-iosched. It also can remove the flag to know hashed or unhashed. Signed-off-by:
Akinobu Mita <mita@miraclelinux.com> Signed-off-by:
Jens Axboe <axboe@suse.de> block/as-iosched.c | 45 +++++++++++++++++++-------------------------- block/deadline-iosched.c | 39 ++++++++++++++++----------------------- 2 files changed, 35 insertions(+), 49 deletions(-)
-
- 08 Jun, 2006 1 commit
-
-
Jens Axboe authored
There's a race between shutting down one io scheduler and firing up the next, in which a new io could enter and cause the io scheduler to be invoked with bad or NULL data. To fix this, we need to maintain the queue lock for a bit longer. Unfortunately we cannot do that, since the elevator init requires to be run without the lock held. This isn't easily fixable, without also changing the mempool API. So split the initialization into two parts, and alloc-init operation and an attach operation. Then we can preallocate the io scheduler and related structures, and run the attach inside the lock after we detach the old one. This patch has survived 30 minutes of 1 second io scheduler switching with a very busy io load. Signed-off-by:
Jens Axboe <axboe@suse.de> Signed-off-by:
Linus Torvalds <torvalds@osdl.org>
-
- 21 Apr, 2006 1 commit
-
-
David Woodhouse authored
They were abusing the rb_color field to mark nodes which weren't currently on the tree. Fix that to use the same method as eventpoll did -- setting the parent pointer to point back to itself. And use the appropriate accessor macros for setting and reading the parent. Signed-off-by:
David Woodhouse <dwmw2@infradead.org>
-
- 18 Apr, 2006 1 commit
-
-
OGAWA Hirofumi authored
On rmmod path, cfq/as waits to make sure all io-contexts was freed. However, it's using complete(), not wait_for_completion(). I think barrier() is not enough in here. To avoid the following case, this patch replaces barrier() with smb_wmb(). cpu0 visibility cpu1 [ioc_gnone=NULL,ioc_count=1] ioc_gnone = &all_gone NULL,ioc_count=1 atomic_read(&ioc_count) NULL,ioc_count=1 wait_for_completion() NULL,ioc_count=0 atomic_sub_and_test() NULL,ioc_count=0 if ( && ioc_gone) [ioc_gone==NULL, so doesn't call complete()] &all_gone,ioc_count=0 Signed-off-by:
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by:
Jens Axboe <axboe@suse.de>
-
- 19 Mar, 2006 1 commit
-
-
Al Viro authored
-
- 18 Mar, 2006 3 commits
-
-
Al Viro authored
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
Al Viro authored
Signed-off-by:
Al Viro <viro@zeniv.linux.org.uk>
-
- 06 Jan, 2006 1 commit
-
-
Tejun Heo authored
Unlike other ioscheds, as-iosched handles alias by chaing them using rq->queuelist. As aliased requests are very rare in the first place, this complicates merge/dispatch handling without meaningful performance improvement. This patch updates as-iosched to dump aliased requests into dispatch queue as other ioscheds do. Signed-off-by:
Tejun Heo <htejun@gmail.com> Signed-off-by:
Jens Axboe <axboe@suse.de>
-