aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c (unfollow)
AgeCommit message (Collapse)AuthorFilesLines
2007-02-11cfq-iosched: check whether a queue timed out in accountingJens Axboe1-14/+18
Makes it more fair for the residual slice count. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11cfq-iosched: tweak the FIFO checkingJens Axboe1-3/+4
We currently check the FIFO once per slice. Optimize that a bit and only do it as the first thing for a new slice, so we don't end up doing a single request and then seek to the FIFO requests. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11cfq-iosched: don't pass in queue for cfq_arm_slice_timer()Jens Axboe1-5/+4
It must always be the active queue, otherwise it's a bug. So just use the active_queue, don't pass it in explicitly. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11cfq-iosched: account for slice over/under timeJens Axboe1-20/+12
If a slice uses less than it is entitled to (or perhaps more), include that in the decision on how much time to give it the next time it gets serviced. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11cfq-iosched: defer slice activation to first request being activeJens Axboe1-38/+53
This better matches what time the queue is actually spending doing IO. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11[PATCH] cfq-iosched: use last service point as the fairness criteriaJens Axboe1-14/+34
Right now we use slice_start, which gives async queues an unfair advantage. Chance that to service_last, and base the resorter on that. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11cfq-iosched: document the cfqq flagsJens Axboe1-9/+9
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11[PATCH] cfq-iosched: move on_rr check into cfq_resort_rr_list()Jens Axboe1-10/+9
Move the on_rr check into cfq_resort_rr_list(), every call site needs to check it anyway. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11cfq-iosched: remove cfq_io_context last_queueJens Axboe2-18/+2
It hasn't been used for a while, kill it off and remove the old if 0 code chunk. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11elevator: don't sort reads between writesJens Axboe1-0/+2
Don't allow elv_dispatch_sort() to mix reads and writes together, it's rarely a good idea. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11elevator: abstract out the activate and deactivate functionsJens Axboe1-9/+20
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-02-11[PATCH] fix fatal kernel-doc errorRandy Dunlap1-1/+2
Teach kernel-doc to handle functions that look like the new pcim_iomap_table(). Fixes this fatal error in scripts/kernel-doc: DOCPROC Documentation/DocBook/kernel-api.xml Error(/tester/linsrc/linux-2.6.20-git6//drivers/pci/pci.c:1351): cannot understand prototype: 'void __iomem * const * pcim_iomap_table(struct pci_dev *pdev) ' make[1]: *** [Documentation/DocBook/kernel-api.xml] Error 1 make: *** [htmldocs] Error 2 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] add missing io...._rep() on sparc32Al Viro1-0/+29
same as on sparc64 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Switch s390 to NO_IOMEMAl Viro4-125/+2
Martin Schwidefsky wrote: "s390 does not even need (in|out)b(_p|). I wondered what else from io.h do we not need. The answer is: almost nothing. With the devres patch from Al and the dma-mapping patch from Heiko we can get rid of iomem and all associated definitions." So we'll just need to replace NO_IOPORT with NO_IOMEM in Kconfig and kill arch/s390/mm/ioremap.c. BTW, there's an annoying bit of junk in there - IO_SPACE_LIMIT. We only need it for /proc/ioports, which AFAICS shouldn't even be there on s390 (or uml). OTOH, removing that thing would mean a user-visible change - we go from "empty file in /proc" to "no such file in /proc"... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] sort the devres mess outAl Viro21-397/+442
* Split the implementation-agnostic stuff in separate files. * Make sure that targets using non-default request_irq() pull kernel/irq/devres.o * Introduce new symbols (HAS_IOPORT and HAS_IOMEM) defaulting to positive; allow architectures to turn them off (we needed these symbols anyway for dependencies of quite a few drivers). * protect the ioport-related parts of lib/devres.o with CONFIG_HAS_IOPORT. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] FRA_{DST,SRC} are le16 for decnetAl Viro1-6/+6
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] fix misannotation of linkinfo_dnAl Viro1-1/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] fix DocBook buildDon Mullis2-5/+5
Fix DocBook build. Regression was introduced by gregkh-usb-usb-linux-usb_ch9h-becomes-linux-usb-ch9h.patch Tested by `make htmldocs`. Signed-off-by: Don Mullis <dwm@meer.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] fix gregkh-usb-usbcore-remove-unused-bandwith-related-codeAndrew Morton1-2/+2
drivers/isdn/gigaset/bas-gigaset.c: In function 'dump_urb': drivers/isdn/gigaset/bas-gigaset.c:258: error: 'struct urb' has no member named 'bandwidth' Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] CHAR-Amiserial: turn local_save_flags() + local_irq_disable() into local_irq_save()Jiri Kosina1-2/+1
drivers/char/amiserial.c::rs_write() contains local_irq_disable() after local_save_flags(). Turn it into local_irq_save(). Signed-off-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] rapidio: fix multi-switch enumerationAlexandre Bounine2-31/+88
This patch contains two fixes for RapisIO enumeration logic: 1. Fix enumeration in configurations with multiple switches. The patch adds: a. Enumeration of an empty switch. Empty switch is a switch that does not have any endpoint devices attached to it (except host device or previous switch in a chain). New code assigns a phony destination ID associated with the switch and sets up corresponding routes. b. Adds a second pass to the enumeration to setup routes to devices discovered after switch was scanned. 2. Fix enumeration failure when riohdid parameter has non-zero value. Current version fails to setup response path to the host when it has destination ID other that 0. Signed-off-by: Alexandre Bounine <alexandreb@tundra.com> Acked-by: Matt Porter <mporter@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] tty: cleanup release_memChristoph Hellwig1-36/+37
release_mem contains two copies of exactly the same code. Refactor these into a new helper, release_tty. The only change in behaviour is that the driver reference count is now decremented after the master tty has been freed instead of before. [penberg@cs.helsinki.fi: fix use-after-free in release_tty.] Cc: Alan Cox <alan@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] ifdef ->rchar, ->wchar, ->syscr, ->syscw from task_structAlexey Dobriyan4-12/+58
They are fat: 4x8 bytes in task_struct. They are uncoditionally updated in every fork, read, write and sendfile. They are used only if you have some "extended acct fields feature". And please, please, please, read(2) knows about bytes, not characters, why it is called "rchar"? Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Jay Lan <jlan@engr.sgi.com> Cc: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Move TASK_XACCT, TASK_IO_ACCOUNTING up in menusAlexey Dobriyan1-18/+18
Since they depends on TASKSTATS, it would be nice to move them closer to another options depending on TASKSTATS. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] _proc_do_string(): fix short readsOleg Nesterov1-4/+12
If you try to read things like /proc/sys/kernel/osrelease with single-byte reads, you get just one byte and then EOF. This is because _proc_do_string() assumes that the caller is read()ing into a buffer which is large enough to fit the whole string in a single hit. Fix. Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Fix sparse annotation of spin unlock macros in one casePavel Roskin1-9/+24
SMP systems without premption and spinlock debugging enabled use unlock macros that don't tell sparse that the lock is being released. Add sparse annotations in this case. Signed-off-by: Pavel Roskin <proski@gnu.org> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Change constant zero to NOTIFY_DONE in ratelimit_handler()Paul E. McKenney1-1/+1
Change a hard-coded constant 0 to the symbolic equivalent NOTIFY_DONE in the ratelimit_handler() CPU notifier handler function. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] highmem: catch illegal nestingIngo Molnar1-3/+4
Catch illegally nested kmap_atomic()s even if the page that is mapped by the 'inner' instance is from lowmem. This avoids spuriously zapped kmap-atomic ptes and turns hard to find crashes into clear asserts at the bug site. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] jbd layer function called instead of fs specific oneDmitriy Monakhov2-4/+4
jbd function called instead of fs specific one. Signed-off-by: Dmitriy Monakhov <dmonakhov@openvz.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Fix apparent typo CONFIG_LOCKDEP_DEBUGRobert P. J. Day1-1/+1
Replace the apparent typo CONFIG_LOCKDEP_DEBUG with the correct CONFIG_DEBUG_LOCKDEP. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] mxser: remove useless fieldsCedric Le Goater1-6/+1
the session and pgrp fields in mxser_struct are unused. Signed-off-by: Cedric Le Goater <clg@fr.ibm.com> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] drivers/block/DAC960: convert 'boolean' to 'bool'Richard Knutsson2-287/+280
Converts 'boolean' to 'bool' and removes the 'boolean' typedef. Signed-off-by: Richard Knutsson <ricknu-0@student.ltu.se> Cc: Jens Axboe <axboe@suse.de> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] some rtc documentation updatesMike Frysinger1-12/+34
Fix typo when describing RTC_WKALM. Add some helpful pointers to people developing their own RTC driver. Change a bunch of the error messages in the test program to be a bit more helpful. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] order of lockdep off/on in vprintk() should be changedMathieu Desnoyers1-3/+3
The order of locking between lockdep_off/on() and local_irq_save/restore() in vprintk() should be changed. * In kernel/printk.c : vprintk() does : preempt_disable() local_irq_save() lockdep_off() spin_lock(&logbuf_lock) spin_unlock(&logbuf_lock) if(!down_trylock(&console_sem)) up(&console_sem) lockdep_on() local_irq_restore() preempt_enable() The goals here is to make sure we do not call printk() recursively from kernel/lockdep.c:__lock_acquire() (called from spin_* and down/up) nor from kernel/lockdep.c:trace_hardirqs_on/off() (called from local_irq_restore/save). It can then potentially call printk() through mark_held_locks/mark_lock. It correctly protects against the spin_lock call and the up/down call, but it does not protect against local_irq_restore. It could cause infinite recursive printk/trace_hardirqs_on() calls when printk() is called from the mark_lock() error handing path. We should change the locking so it becomes correct : preempt_disable() lockdep_off() local_irq_save() spin_lock(&logbuf_lock) spin_unlock(&logbuf_lock) if(!down_trylock(&console_sem)) up(&console_sem) local_irq_restore() lockdep_on() preempt_enable() Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Remove unused kernel config option PARIDE_PARPORTRobert P. J. Day1-7/+1
Remove the unused kernel config option PARIDE_PARPORT. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Remove unused kernel config option ZISOFS_FSRobert P. J. Day1-6/+0
Remove the kernel config option ZISOFS_FS, since it appears that the actual option is simply ZISOFS. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Remove references to obsolete kernel config option DEBUG_RWSEMSRobert P. J. Day1-9/+0
Remove the few references to the obsolete kernel config option DEBUG_RWSEMS. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Remove dead kernel config option AEDSP16_MPU401.Robert P. J. Day1-12/+0
Remove the dead kernel config option AEDSP16_MPU401. Signed-off-by: Robert P. J. Day <mindspring.com> Cc: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Replace regular code with appropriate calls to container_of()Robert P. J. Day5-10/+6
Replace a small number of expressions with a call to the "container_of()" macro. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Paul Mackerras <paulus@samba.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: James Morris <jmorris@namei.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] cleanup include/linux/reiserfs_xattr.hAdrian Bunk1-5/+19
- #ifdef guard this header for multiple inclusion - adjust the #include's to what is actually required by this header - remove an unneeded #ifdef - #endif comments Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] cleanup include/linux/xattr.hAdrian Bunk2-1/+9
- reduce the userspace visible part - fix the in-kernel compilation Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] Remove final reference to superfluous smp_commence()Robert P. J. Day1-5/+0
Remove the last (and commented out) invocation of the obsolete smp_commence() call. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Acked-by: Ingo Molnar <mingo@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11[PATCH] buffer: memorder fixNick Piggin1-0/+1
unlock_buffer(), like unlock_page(), must not clear the lock without ensuring that the critical section is closed. Mingming later sent the same patch, saying: We are running SDET benchmark and saw double free issue for ext3 extended attributes block, which complains the same xattr block already being freed (in ext3_xattr_release_block()). The problem could also been triggered by multiple threads loop untar/rm a kernel tree. The race is caused by missing a memory barrier at unlock_buffer() before the lock bit being cleared, resulting in possible concurrent h_refcounter update. That causes a reference counter leak, then later leads to the double free that we have seen. Inside unlock_buffer(), there is a memory barrier is placed *after* the lock bit is being cleared, however, there is no memory barrier *before* the bit is cleared. On some arch the h_refcount update instruction and the clear bit instruction could be reordered, thus leave the critical section re-entered. The race is like this: For example, if the h_refcount is initialized as 1, cpu 0: cpu1 -------------------------------------- ----------------------------------- lock_buffer() /* test_and_set_bit */ clear_buffer_locked(bh); lock_buffer() /* test_and_set_bit */ h_refcount = h_refcount+1; /* = 2*/ h_refcount = h_refcount + 1; /*= 2 */ clear_buffer_locked(bh); .... ...... We lost a h_refcount here. We need a memory barrier before the buffer head lock bit being cleared to force the order of the two writes. Please apply. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>