<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/mm/dmapool.c, branch v3.0.44</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/mm/dmapool.c?h=v3.0.44</id>
<link rel='self' href='https://git.amat.us/linux/atom/mm/dmapool.c?h=v3.0.44'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-01-14T01:32:48Z</updated>
<entry>
<title>mm/dmapool.c: use TASK_UNINTERRUPTIBLE in dma_pool_alloc()</title>
<updated>2011-01-14T01:32:48Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2011-01-13T23:47:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=684265d4a30f133162f06ddb2e5010608e60e4bb'/>
<id>urn:sha1:684265d4a30f133162f06ddb2e5010608e60e4bb</id>
<content type='text'>
As it stands this code will degenerate into a busy-wait if the calling task
has signal_pending().

Cc: Rolf Eike Beer &lt;eike-kernel@sf-tec.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/dmapool.c: take lock only once in dma_pool_free()</title>
<updated>2011-01-14T01:32:48Z</updated>
<author>
<name>Rolf Eike Beer</name>
<email>eike-kernel@sf-tec.de</email>
</author>
<published>2011-01-13T23:47:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=84bc227d7fde049a568cd58a5610613feedc0dff'/>
<id>urn:sha1:84bc227d7fde049a568cd58a5610613feedc0dff</id>
<content type='text'>
dma_pool_free() scans for the page to free in the pool list holding the
pool lock.  Then it releases the lock basically to acquire it immediately
again.  Modify the code to only take the lock once.

This will do some additional loops and computations with the lock held in
if memory debugging is activated.  If it is not activated the only new
operations with this lock is one if and one substraction.

Signed-off-by: Rolf Eike Beer &lt;eike-kernel@sf-tec.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm: add a might_sleep_if() to dma_pool_alloc()</title>
<updated>2010-10-26T23:52:08Z</updated>
<author>
<name>Dima Zavin</name>
<email>dima@android.com</email>
</author>
<published>2010-10-26T21:21:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ea05c8444e451f1cfbf78c68733e717ad7b8602b'/>
<id>urn:sha1:ea05c8444e451f1cfbf78c68733e717ad7b8602b</id>
<content type='text'>
Buggy drivers (e.g.  fsl_udc) could call dma_pool_alloc from atomic
context with GFP_KERNEL.  In most instances, the first pool_alloc_page
call would succeed and the sleeping functions would never be called.  This
allowed the buggy drivers to slip through the cracks.

Add a might_sleep_if() checking for __GFP_WAIT in flags.

Signed-off-by: Dima Zavin &lt;dima@android.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dmapools: protect page_list walk in show_pools()</title>
<updated>2009-07-01T01:56:00Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2009-06-30T18:41:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c49568235dd7b4a2ffad63aa950562f4ffb9455f'/>
<id>urn:sha1:c49568235dd7b4a2ffad63aa950562f4ffb9455f</id>
<content type='text'>
show_pools() walks the page_list of a pool w/o protection against the list
modifications in alloc/free.  Take pool-&gt;lock to avoid stomping into
nirvana.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>dmapool: enable debugging for CONFIG_SLUB_DEBUG_ON too</title>
<updated>2008-04-28T15:58:20Z</updated>
<author>
<name>Andi Kleen</name>
<email>ak@suse.de</email>
</author>
<published>2008-04-28T09:12:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b5ee5befa75e33e55d34584ad10286c5005cb1de'/>
<id>urn:sha1:b5ee5befa75e33e55d34584ad10286c5005cb1de</id>
<content type='text'>
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 &lt;willy@linux.intel.com&gt;
Signed-off-by: Andi Kleen &lt;ak@suse.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>pool: Improve memory usage for devices which can't cross boundaries</title>
<updated>2007-12-04T15:39:58Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2007-12-03T19:16:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e34f44b3517fe545f7fd45a8c2f6ee1e5e4432d3'/>
<id>urn:sha1:e34f44b3517fe545f7fd45a8c2f6ee1e5e4432d3</id>
<content type='text'>
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 &lt;willy@linux.intel.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Change dmapool free block management</title>
<updated>2007-12-04T15:39:57Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2007-12-03T19:08:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a35a3455142976e3fffdf27027f3082cbaba6e8c'/>
<id>urn:sha1:a35a3455142976e3fffdf27027f3082cbaba6e8c</id>
<content type='text'>
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 &lt;willy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>dmapool: Tidy up includes and add comments</title>
<updated>2007-12-04T15:39:57Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2007-12-03T17:16:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6182a0943af2235756836ed7e021fa22b93ec68b'/>
<id>urn:sha1:6182a0943af2235756836ed7e021fa22b93ec68b</id>
<content type='text'>
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 &lt;willy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>dmapool: Validate parameters to dma_pool_create</title>
<updated>2007-12-04T15:39:56Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2007-12-03T17:10:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=399154be2dcb6a58dbde9682162c38113cf3e40b'/>
<id>urn:sha1:399154be2dcb6a58dbde9682162c38113cf3e40b</id>
<content type='text'>
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 &lt;willy@linux.intel.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Avoid taking waitqueue lock in dmapool</title>
<updated>2007-12-04T15:39:56Z</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2007-12-03T17:09:33Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=2cae367e4854ff055c4f5e8aacd56b0eeec9f6cb'/>
<id>urn:sha1:2cae367e4854ff055c4f5e8aacd56b0eeec9f6cb</id>
<content type='text'>
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 &lt;willy@linux.intel.com&gt;
Acked-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
