24 Apr, 2009
2 commits
-
This simplifies I/O stat accounting switching code and separates it
completely from I/O scheduler switch code.Requests are accounted according to the state of their request queue
at the time of the request allocation. There is no need anymore to
flush the request queue when switching I/O accounting state.Signed-off-by: Jerome Marchand
Signed-off-by: Jens Axboe -
Fix this build error:
In file included from fs/compat_ioctl.c:104:
include/linux/pktcdvd.h:285: error: expected specifier-qualifier-list before 'mempool_t'Signed-off-by: Alexander Beregalov
Signed-off-by: Jens Axboe
22 Apr, 2009
38 commits
-
If the cfq io context doesn't have enough samples yet to provide a mean
seek distance, then use the default threshold we have for seeky IO instead
of defaulting to 0.Signed-off-by: Jeff Moyer
Signed-off-by: Jens Axboe -
Right now, depending on the first sector to which a process issues I/O,
the seek time may start out way out of whack. So make sure we start
with 0 sectors in seek, instead of the offset of the first request
issued.Signed-off-by: Jeff Moyer
Signed-off-by: Jens Axboe -
There's nothing to do for those devices, since the timeout handling is
based on requests.Signed-off-by: Jens Axboe
-
/proc/diskstats used to show stats for all disks whether they're
zero-sized or not and their non-zero partitions. Commit
074a7aca7afa6f230104e8e65eba3420263714a5 accidentally changed the
behavior such that it doesn't print out zero sized disks. This patch
implements DISK_PITER_INCL_EMPTY_PART0 flag to partition iterator and
uses it in diskstats_show() such that empty part0 is shown in
/proc/diskstats.Reported and bisectd by Dianel Collins.
Signed-off-by: Tejun Heo
Reported-by: Daniel Collins
Signed-off-by: Jens Axboe -
Impact: remove possible deadlock condition
There is no reason to use mempool backed allocation for map functions.
Also, because kern mapping is used inside LLDs (e.g. for EH), using
mempool backed allocation can lead to deadlock under extreme
conditions (mempool already consumed by the time a request reached EH
and requests are blocked on EH).Switch copy/map functions to bio_kmalloc().
Signed-off-by: Tejun Heo
Signed-off-by: Jens Axboe -
Impact: fix bio_kmalloc() and its destruction path
bio_kmalloc() was broken in two ways.
* bvec_alloc_bs() first allocates bvec using kmalloc() and then
ignores it and allocates again like non-kmalloc bvecs.* bio_kmalloc_destructor() didn't check for and free bio integrity
data.This patch fixes the above problems. kmalloc patch is separated out
from bio_alloc_bioset() and allocates the requested number of bvecs as
inline bvecs.* bio_alloc_bioset() no longer takes NULL @bs. None other than
bio_kmalloc() used it and outside users can't know how it was
allocated anyway.* Define and use BIO_POOL_NONE so that pool index check in
bvec_free_bs() triggers if inline or kmalloc allocated bvec gets
there.* Relocate destructors on top of each allocation function so that how
they're used is more clear.Jens Axboe suggested allocating bvecs inline.
Signed-off-by: Tejun Heo
Signed-off-by: Jens Axboe -
Impact: don't set GFP_DMA in q->bounce_gfp unnecessarily
All DMA address limits are expressed in terms of the last addressable
unit (byte or page) instead of one plus that. However, when
determining bounce_gfp for 64bit machines in blk_queue_bounce_limit(),
it compares the specified limit against 0x100000000UL to determine
whether it's below 4G ending up falsely setting GFP_DMA in
q->bounce_gfp.As DMA zone is very small on x86_64, this makes larger SG_IO transfers
very eager to trigger OOM killer. Fix it. While at it, rename the
parameter to @dma_mask for clarity and convert comment to proper
winged style.Signed-off-by: Tejun Heo
Signed-off-by: Jens Axboe -
Impact: fix SG_IO behavior such that it matches the documentation
SG_IO howto says that if ->dxfer_len and sum of iovec disagress, the
shorter one wins. However, the current implementation returns -EINVAL
for such cases. Trim iovc if it's longer than ->dxfer_len.This patch uses iov_*() helpers which take struct iovec * by casting
struct sg_iovec * to it. sg_iovec is always identical to iovec and
this will be further cleaned up with later patches.Signed-off-by: Tejun Heo
Signed-off-by: Jens Axboe -
Impact: fix not-so-critical but annoying bug
sg_miter_next() returns 0 sized mapping if there is an zero sized sg
entry in the list or at the end of each iteration. As the users
always check the ->length field, this bug shouldn't be critical other
than causing unnecessary iteration.Fix it.
Signed-off-by: Tejun Heo
Signed-off-by: Jens Axboe -
There is currently only one way for userspace to say "wait for my storage
device to get ready for the modules I just loaded": to load the
scsi_wait_scan module. Expectations of userspace are that once this
module is loaded, all the (storage) devices for which the drivers
were loaded before the module load are present.Now, there are some issues with the implementation, and the async
stuff got caught in the middle of this: The existing code only
waits for the scsy async probing to finish, but it did not take
into account at all that probing might not have begun yet.
(Russell ran into this problem on his computer and the fix works for him)This patch fixes this more thoroughly than the previous "fix", which
had some bad side effects (namely, for kernel code that wanted to wait for
the scsi scan it would also do an async sync, which would deadlock if you did
it from async context already.. there's a report about that on lkml):
The patch makes the module first wait for all device driver probes, and then it
will wait for the scsi parallel scan to finish.Signed-off-by: Arjan van de Ven
Tested-by: Russell King
Signed-off-by: Linus Torvalds -
Fix a comment typo in slow-work.h
...a trivial mistake, but it will mess up kerneldoc if nothing else.
Signed-off-by: Jonathan Corbet
Signed-off-by: Linus Torvalds -
Collect the DECLARE/DEFINE declarations together in linux/percpu-defs.h so
that they're in one place, and give them descriptive comments, particularly
the SHARED_ALIGNED variant.It would be nice to collect these in linux/percpu.h, but that's not possible
without sorting out the severe #include recursion between the x86 arch headers
and the general headers (and possibly other arches too).Signed-off-by: David Howells
Signed-off-by: Linus Torvalds -
In non-SMP mode, the variable section attribute specified by DECLARE_PER_CPU()
does not agree with that specified by DEFINE_PER_CPU(). This means that
architectures that have a small data section references relative to a base
register may throw up linkage errors due to too great a displacement between
where the base register points and the per-CPU variable.On FRV, the .h declaration says that the variable is in the .sdata section, but
the .c definition says it's actually in the .data section. The linker throws
up the following errors:kernel/built-in.o: In function `release_task':
kernel/exit.c:78: relocation truncated to fit: R_FRV_GPREL12 against symbol `per_cpu__process_counts' defined in .data section in kernel/built-in.o
kernel/exit.c:78: relocation truncated to fit: R_FRV_GPREL12 against symbol `per_cpu__process_counts' defined in .data section in kernel/built-in.oTo fix this, DECLARE_PER_CPU() should simply apply the same section attribute
as does DEFINE_PER_CPU(). However, this is made slightly more complex by
virtue of the fact that there are several variants on DEFINE, so these need to
be matched by variants on DECLARE.Signed-off-by: David Howells
Signed-off-by: Linus Torvalds -
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: fix btrfs fallocate oops and deadlock
Btrfs: use the right node in reada_for_balance
Btrfs: fix oops on page->mapping->host during writepage
Btrfs: add a priority queue to the async thread helpers
Btrfs: use WRITE_SYNC for synchronous writes -
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
go7007: Convert to the new i2c device binding model -
`!' has a higher precedence than `&', parentheses are misplaced.
Signed-off-by: Roel Kluin
Cc: Alan Cox
Acked-by: Sonic Zhang
Cc: Bryan Wu
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Commit a6dc60f8975ad96d162915e07703a4439c80dcf0 ("vmscan: rename
sc.may_swap to may_unmap") removed the may_swap flag, but memcg had used
it as a flag for "we need to use swap?", as the name indicate.And in the current implementation, memcg cannot reclaim mapped file
caches when mem+swap hits the limit.re-introduce may_swap flag and handle it at get_scan_ratio(). This
patch doesn't influence any scan_control users other than memcg.Signed-off-by: KOSAKI Motohiro
Signed-off-by: Daisuke Nishimura
Acked-by: Johannes Weiner
Cc: Balbir Singh
Cc: KAMEZAWA Hiroyuki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Error found by Jeff Haran.
The error detect register is 0s when no errors are detected. The check
code is incorrect, so reverse check sense.Reported-by: Jeff Haran
Signed-off-by: Dave Jiang
Signed-off-by: Doug Thompson
Cc: Benjamin Herrenschmidt
Acked-by: Kumar Gala
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13133
ODEBUG: object is on stack, but not annotated
------------[ cut here ]------------
WARNING: at lib/debugobjects.c:253 __debug_object_init+0x1f3/0x276()
Hardware name: VMware Virtual Platform
Modules linked in: mptspi(+) mptscsih mptbase scsi_transport_spi ext3 jbd mbcache
Pid: 540, comm: insmod Not tainted 2.6.28-mm1 #2
Call Trace:
[] warn_slowpath+0x74/0x8a
[] ? start_critical_timing+0x96/0xb7
[] ? _spin_unlock_irqrestore+0x2f/0x3c
[] ? trace_hardirqs_off_caller+0x18/0xaf
[] ? trace_hardirqs_off+0xb/0xd
[] ? _spin_unlock_irqrestore+0x2f/0x3c
[] ? release_console_sem+0x1a5/0x1ad
[] __debug_object_init+0x1f3/0x276
[] debug_object_init+0x13/0x17
[] init_timer+0x10/0x1a
[] mpt_config+0x1c1/0x2b7 [mptbase]
[] ? kmalloc+0x8/0xa [mptbase]
[] ? kmalloc+0x8/0xa [mptbase]
[] mpt_do_ioc_recovery+0x950/0x1212 [mptbase]
[] ? __lock_acquire+0xa69/0xacc
[] ? _spin_unlock_irqrestore+0x36/0x3c
[] ? _spin_unlock_irq+0x22/0x26
[] ? string+0x2b/0x76
[] ? vsnprintf+0x338/0x7b3
[] ? __lock_acquire+0xa69/0xacc
[] ? _spin_unlock_irqrestore+0x2f/0x3c
[] ? __lock_acquire+0xa69/0xacc
[] ? debug_check_no_locks_freed+0xeb/0x105
[] ? _spin_unlock_irqrestore+0x36/0x3c
[] ? debug_check_no_locks_freed+0x2a/0x105
[] ? lock_release_holdtime+0x43/0x48
[] ? up_read+0x16/0x29
[] ? pci_get_slot+0x66/0x72
[] mpt_attach+0x881/0x9b1 [mptbase]
[] mptspi_probe+0x11/0x354 [mptspi]Noticing that every caller of mpt_config has its CONFIGPARMS struct
declared on the stack and thus the &pCfg->timer is always on the stack I
changed init_timer() to init_timer_on_stack() and it seems to have shut
up.....Cc: "Moore, Eric Dean"
Cc: James Bottomley
Cc: Thomas Gleixner
Acked-by: "Desai, Kashyap"
Cc: [2.6.29.x]
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
For an upcoming distro release, we need to have the xp kernel module
loadable even when not on UV equipment. The xpc module will not load.
This will allow one set of modules dependent upon xp to work on either UV
or non-UV equipment.Signed-off-by: Robin Holt
Signed-off-by: Jack Steiner
Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Got this warning from Kconfig:
boolean symbol INPUT tested for 'm'? test forced to 'n'
because INPUT is tristate, not bool.
Signed-off-by: WANG Cong
Cc: Sam Ravnborg
Cc: Jeff Dike
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Insert PCI root bus resources for the FRV-based MB93090 development kit
motherboard. This is required because the CPU's window onto the PCI bus
address space is considerably smaller than the CPU's full address space
and non-PCI devices lie outside of the PCI window that we might want to
access.Without this patch, the PCI root bus uses the platform-level bus
resources, and these are then confined to the PCI window, thus making
platform_device_add() reject devices outside of this window.Signed-off-by: David Howells
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
With no IRQ available/defined, RTC-CMOS driver prints something like:
rtc0: alarms up to one no, y3k, 114 bytes nvram
^^^^
I guess the following is a bit easier to understand:
rtc0: no alarms, y3k, 114 bytes nvramSigned-off-by: Krzysztof Halasa
Cc: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This is a doc-only patch which I hope will reduce the number of
spi_master controller driver patches starting out with a common
implementation bug.(As in: almost every spi_master driver I see starts out with its
version of this bug. Sigh.)It just re-emphasizes that the setup() method may be called for one
device while a transfer is active on another ... which means that most
driver implementations shouldn't touch any registers.Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add a parenthesized string of "H8300" for more convenient searchability
in the MAINTAINERS file.Signed-off-by: Robert P. J. Day
Cc: Yoshinori Sato
Cc: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Impact: make more work for myself
Signed-off-by: Matt Mackall
Cc: David Woodhouse
Acked-by: Paul Gortmaker
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
On line 944 the return value of flush() is considered as a boolean,
but limit reaches -1 upon timeout which evaluates to true.On 540, 594, 720 the same occurs for wait_ssp_rx_stall()
On 536 the same occurs for wait_dma_channel_stop()Signed-off-by: Roel Kluin
Acked-by: Eric Miao
Cc: David Brownell
Cc: Russell King
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Signed-off-by: Joe Perches
Acked-by: Pekka Enberg
Acked-by: Eduard - Gabriel Munteanu
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
There are no more arches with suspend support using these directories.
Signed-off-by: Joe Perches
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
If DMA is enabled, any spi_sync call after suspend/resume would block
forever, because DRCMR is lost on suspend. This patch restores DRCMR to
the same values set by probe.Signed-off-by: Daniel Ribeiro
Signed-off-by: David Brownell
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
On parisc machines, which don't have HIL, removing the hp_sdc module
panics the kernel. Fix this by returning early in hp_sdc_exit() if no HP
SDC controller was found.Add functionality to probe for the hp_sdc_mlc kernel module (which takes
care of the upper layer HIL functionality on parisc) after two seconds.
This is needed to get all the other HIL drivers (keyboard / mouse/ ..)
drivers automatically loaded by udev later as well.Signed-off-by: Helge Deller
Cc: Geert Uytterhoeven
Cc: Frans Pop
Cc: Kyle McMartin
Cc: Grant Grundler
Acked-by: Dmitry Torokhov
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
mm->owner should be accessed with rcu_dereference().
Reported-by: KOSAKI Motohiro
Signed-off-by: KAMEZAWA Hiroyuki
Acked-by: Balbir Singh
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This fixes the following BUG:
# mount -o size=MM -t hugetlbfs none /huge
hugetlbfs: Bad value 'MM' for mount option 'size=MM'
------------[ cut here ]------------
kernel BUG at fs/super.c:996!Due to
BUG_ON(!mnt->mnt_sb);
in vfs_kern_mount().
Also, remove unused #include
Cc: William Irwin
Cc:
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Enable userspace to receive messages that a BMC transmits using an OEM
medium. This is used by the HP iLO2.Based on code originally written by Patrick Schoeller.
Signed-off-by: dann frazier
Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Bela Lubkin noticed that the statistics for send IPMB and LAN commands
in the IPMI driver could be incremented even if an error occurred. Move
the increments to the proper place to avoid this.Also add some statistics for retransmissions that failed, and some little
helper functions to neaten up the code a little.Signed-off-by: Corey Minyard
Cc: Bela Lubkin
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The IPMI driver would attempt to use the event buffer even if that
didn't exist on the BMC. This patch modified the IPMI driver to check
for the event buffer's existence before trying to use it.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The wrong return value is being tested when allocating a platform device
in the IPMI SI code. Check the right value.Signed-off-by: Corey Minyard
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds