linux/drivers
Tejun Heo 35ab8d3251 ide-tape: use single continuous buffer
Impact: simpler buffer allocation and handling, kills OOM, fix DMA transfers

ide-tape has its own multiple buffer mechanism using struct
idetape_bh.  It allocates buffer with decreasing order-of-two
allocations so that it results in minimum number of segments.
However, the implementation is quite complex and works in a way that
no other block or ide driver works necessitating a lot of special case
handling.

The benefit this complex allocation scheme brings is questionable as
PIO or DMA the number of segments (16 maximum) doesn't make any
noticeable difference and it also doesn't negate the need for multiple
order allocation which can fail under memory pressure or high
fragmentation although it does lower the highest order necessary by
one when the buffer size isn't power of two.

As the first step to remove the custom buffer management, this patch
makes ide-tape allocate single continous buffer.  The maximum order is
four.  I doubt the change would cause any trouble but if it ever
matters, it should be converted to regular sg mechanism like everyone
else and even in that case dropping custom buffer handling and moving
to standard mechanism first make sense as an intermediate step.

This patch makes the first bh to contain the whole buffer and drops
multi bh handling code.  Following patches will make further changes.

This patch has the side effect of killing OOM triggered by allocation
path and fixing DMA transfers.  Previously, bug in alloc path
triggered OOM on command issue and commands were passed to DMA engine
without DMA-mapping all the segments.

Signed-off-by: Tejun Heo <tj@kernel.org>
2009-04-19 08:46:02 +09:00
..
accessibility
acpi Revert "ACPI battery: fix async boot oops" 2009-04-11 12:45:20 -07:00
amba
ata [libata] fix build error on drivers/ata/pata_legacy.c 2009-04-17 19:05:33 -04:00
atm Replace all DMA_nBIT_MASK macro with DMA_BIT_MASK(n) 2009-04-13 15:04:33 -07:00
auxdisplay
base driver core: prevent device_for_each_child from oopsing 2009-04-16 16:17:11 -07:00
block USB: add reset endpoint operations 2009-04-17 10:50:27 -07:00
bluetooth
cdrom
char Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-04-17 09:56:11 -07:00
clocksource
connector
cpufreq
cpuidle
crypto dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
dca
dio
dma dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
edac edac: use to_delayed_work() 2009-04-13 15:04:34 -07:00
eisa
firewire
firmware dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
gpio Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-04-03 15:24:35 -07:00
gpu Merge branch 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel 2009-04-14 13:16:40 -07:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2009-04-03 15:25:44 -07:00
hwmon hwmon: sht15 humidity sensor driver 2009-04-13 15:04:29 -07:00
i2c i2c: Let new-style drivers implement attach_adapter 2009-04-13 17:02:14 +02:00
ide ide-tape: use single continuous buffer 2009-04-19 08:46:02 +09:00
idle dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) 2009-04-07 08:31:10 -07:00
ieee1394 dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
infiniband Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband 2009-04-09 16:42:26 -07:00
input Merge branch 'next' into for-linus 2009-04-16 08:51:52 -07:00
isdn USB: add reset endpoint operations 2009-04-17 10:50:27 -07:00
leds leds: just ignore invalid GPIOs in leds-gpio 2009-04-08 14:13:48 +01:00
lguest
macintosh
mca
md block: move bio list helpers into bio.h 2009-04-15 08:28:09 +02:00
media USB: add reset endpoint operations 2009-04-17 10:50:27 -07:00
memstick dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
message dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
mfd mfd: fix da903x warning 2009-04-05 00:32:25 +02:00
misc sgi-xpc: clean up numerous globals 2009-04-13 15:04:33 -07:00
mmc mmc_spi: support for non-byte-aligned cards 2009-04-08 20:45:51 +02:00
mtd Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6 2009-04-06 15:00:00 -07:00
net Merge master.kernel.org:/home/rmk/linux-2.6-arm 2009-04-17 13:51:14 -07:00
nubus
of
oprofile Merge branch 'tracing-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2009-04-05 11:04:19 -07:00
parisc parport: Fix various uses of parport_pc 2009-04-14 08:48:50 -07:00
parport parport: Use the PCI IRQ if offered 2009-04-07 08:44:06 -07:00
pci Merge git://git.infradead.org/iommu-2.6 2009-04-13 11:35:50 -07:00
pcmcia
platform Merge branches 'release', 'APERF', 'ARAT', 'misc', 'kelvin', 'device-lock' and 'bjorn.notify' into release 2009-04-07 18:18:42 -04:00
pnp dma-mapping: replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24) 2009-04-07 08:31:12 -07:00
power Merge git://git.infradead.org/battery-2.6 2009-04-08 17:45:02 -07:00
ps3
rapidio dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
regulator
rtc Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 2009-04-05 11:15:54 -07:00
s390 [S390] dasd: fix idaw boundary checking for track based ccw 2009-04-14 15:37:25 +02:00
sbus sbus: changed ioctls to unlocked 2009-04-14 19:46:19 -07:00
scsi Fix lpfc_parse_bg_err()'s use of do_div() 2009-04-14 09:58:17 -07:00
serial [ARM] 5449/1: S3C: Use disable_irq_nosync() to fix boot lockups 2009-04-15 10:01:02 +01:00
sh sh: intc: Added resume from hibernation support to the intc 2009-04-06 08:55:19 -07:00
sn dma-mapping: replace all DMA_64BIT_MASK macro with DMA_BIT_MASK(64) 2009-04-07 08:31:10 -07:00
spi Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 2009-04-15 09:58:21 +01:00
ssb
staging staging: slicoss: update README 2009-04-17 11:06:31 -07:00
tc
telephony
thermal
uio UIO: fix specific device driver missing statement for depmod 2009-04-16 16:17:11 -07:00
usb WUSB: correct format of wusb_chid sysfs file 2009-04-17 10:50:29 -07:00
uwb dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
video intelfb: support i854 2009-04-13 15:04:32 -07:00
virtio
w1 mfd: remove DS1WM clock handling 2009-04-05 00:32:22 +02:00
watchdog [WATCHDOG] omap_wdt.c: move probe function to .devinit.text 2009-04-08 06:21:57 +00:00
xen xen: honour VCPU availability on boot 2009-04-08 14:25:51 -07:00
zorro
Kconfig
Makefile