aboutsummaryrefslogtreecommitdiffstats
path: root/mm/dmapool.c
Commit message (Collapse)AuthorAgeFilesLines
* dmapools: protect page_list walk in show_pools()Thomas Gleixner2009-06-301-0/+2
| | | | | | | | | | | show_pools() walks the page_list of a pool w/o protection against the list modifications in alloc/free. Take pool->lock to avoid stomping into nirvana. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dmapool: enable debugging for CONFIG_SLUB_DEBUG_ON tooAndi Kleen2008-04-281-4/+8
| | | | | | | | | | | | Previously it was only enabled for CONFIG_DEBUG_SLAB. Not hooked into the slub runtime debug configuration, so you currently only get it with CONFIG_SLUB_DEBUG_ON, not plain CONFIG_SLUB_DEBUG Acked-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* pool: Improve memory usage for devices which can't cross boundariesMatthew Wilcox2007-12-041-16/+20
| | | | | | | | | | | | | The previous implementation simply refused to allocate more than a boundary's worth of data from an entire page. Some users didn't know this, so specified things like SMP_CACHE_BYTES, not realising the horrible waste of memory that this was. It's fairly easy to correct this problem, just by ensuring we don't cross a boundary within a page. This even helps drivers like EHCI (which can't cross a 4k boundary) on machines with larger page sizes. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Acked-by: David S. Miller <davem@davemloft.net>
* Change dmapool free block managementMatthew Wilcox2007-12-041-61/+58
| | | | | | | | | Use a list of free blocks within a page instead of using a bitmap. Update documentation to reflect this. As well as being a slight reduction in memory allocation, locked ops and lines of code, it speeds up a transaction processing benchmark by 0.4%. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
* dmapool: Tidy up includes and add commentsMatthew Wilcox2007-12-041-10/+30
| | | | | | | | | | We were missing a copyright statement and license, so add GPLv2, David Brownell's copyright and my copyright. The asm/io.h include was superfluous, but we were missing a few other necessary includes. Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
* dmapool: Validate parameters to dma_pool_createMatthew Wilcox2007-12-041-7/+8
| | | | | | | | | Check that 'align' is a power of two, like the API specifies. Align 'size' to 'align' correctly -- the current code has an off-by-one. The ALIGN macro in kernel.h doesn't. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Acked-by: David S. Miller <davem@davemloft.net>
* Avoid taking waitqueue lock in dmapoolMatthew Wilcox2007-12-041-4/+5
| | | | | | | | | | With one trivial change (taking the lock slightly earlier on wakeup from schedule), all uses of the waitq are under the pool lock, so we can use the locked (or __) versions of the wait queue functions, and avoid the extra spinlock. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Acked-by: David S. Miller <davem@davemloft.net>
* dmapool: Fix style problemsMatthew Wilcox2007-12-041-146/+142
| | | | | | Run Lindent and fix all issues reported by checkpatch.pl Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
* Move dmapool.c to mm/ directoryMatthew Wilcox2007-12-041-0/+481
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>