diff options
author | Tejun Heo <tj@kernel.org> | 2009-04-19 08:46:02 +0900 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2009-04-19 08:46:02 +0900 |
commit | 35ab8d3251833e4052aa64b09b08195e949518c7 (patch) | |
tree | c5502cb57b78625780809a3b65888fdc653b8248 /sound | |
parent | b3071d190d6757b14af002a9d79832f12de61bce (diff) |
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>
Diffstat (limited to 'sound')
0 files changed, 0 insertions, 0 deletions