Re: [PATCH v2] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-20 Thread Jason Cooper
On Tue, Nov 20, 2012 at 11:33:25AM -0800, Andrew Morton wrote: > On Tue, 20 Nov 2012 15:31:45 +0100 > Marek Szyprowski wrote: > > > dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, > > regardless the flags provided by the caller. This causes excessive >

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-20 Thread Andrew Morton
On Tue, 20 Nov 2012 11:48:44 +0100 Marek Szyprowski wrote: > > As this patch is already in -next and is stuck there for two more > > weeks I can't (or at least won't) merge this patch, so I can't help > > with any of the above. > > I will fix both issues in the next version of the patch. Would

Re: [PATCH v2] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-20 Thread Andrew Morton
On Tue, 20 Nov 2012 15:31:45 +0100 Marek Szyprowski wrote: > dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, > regardless the flags provided by the caller. This causes excessive > pruning of emergency memory pools without any good reason. Additionaly, > on ARM arch

[PATCH v2] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-20 Thread Marek Szyprowski
dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags provided by the caller. This causes excessive pruning of emergency memory pools without any good reason. Additionaly, on ARM architecture any driver which is using dmapools will sooner or later trigger

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-20 Thread Marek Szyprowski
Hello, On 11/19/2012 11:48 PM, Andrew Morton wrote: On Sun, 18 Nov 2012 19:18:46 -0500 Jason Cooper wrote: > I've added the maintainers for mm/*. Hopefully they can let us know if > this is good for v3.8... As Marek has inexplicably put this patch into linux-next via his tree, we don't

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-20 Thread Marek Szyprowski
Hello, On 11/19/2012 11:48 PM, Andrew Morton wrote: On Sun, 18 Nov 2012 19:18:46 -0500 Jason Cooper ja...@lakedaemon.net wrote: I've added the maintainers for mm/*. Hopefully they can let us know if this is good for v3.8... As Marek has inexplicably put this patch into linux-next via his

[PATCH v2] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-20 Thread Marek Szyprowski
dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags provided by the caller. This causes excessive pruning of emergency memory pools without any good reason. Additionaly, on ARM architecture any driver which is using dmapools will sooner or later trigger

Re: [PATCH v2] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-20 Thread Andrew Morton
On Tue, 20 Nov 2012 15:31:45 +0100 Marek Szyprowski m.szyprow...@samsung.com wrote: dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags provided by the caller. This causes excessive pruning of emergency memory pools without any good reason. Additionaly, on ARM

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-20 Thread Andrew Morton
On Tue, 20 Nov 2012 11:48:44 +0100 Marek Szyprowski m.szyprow...@samsung.com wrote: As this patch is already in -next and is stuck there for two more weeks I can't (or at least won't) merge this patch, so I can't help with any of the above. I will fix both issues in the next version of

Re: [PATCH v2] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-20 Thread Jason Cooper
On Tue, Nov 20, 2012 at 11:33:25AM -0800, Andrew Morton wrote: On Tue, 20 Nov 2012 15:31:45 +0100 Marek Szyprowski m.szyprow...@samsung.com wrote: dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags provided by the caller. This causes excessive pruning

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-19 Thread Andrew Morton
On Sun, 18 Nov 2012 19:18:46 -0500 Jason Cooper wrote: > I've added the maintainers for mm/*. Hopefully they can let us know if > this is good for v3.8... As Marek has inexplicably put this patch into linux-next via his tree, we don't appear to be getting a say in the matter! The patch looks

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-19 Thread Andrew Morton
On Sun, 18 Nov 2012 19:18:46 -0500 Jason Cooper ja...@lakedaemon.net wrote: I've added the maintainers for mm/*. Hopefully they can let us know if this is good for v3.8... As Marek has inexplicably put this patch into linux-next via his tree, we don't appear to be getting a say in the matter!

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-18 Thread Jason Cooper
Marek, I've added the maintainers for mm/*. Hopefully they can let us know if this is good for v3.8... thx, Jason. On Thu, Nov 08, 2012 at 07:38:57AM +0100, Marek Szyprowski wrote: > dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless > the flags provided by the

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-18 Thread Jason Cooper
Marek, I've added the maintainers for mm/*. Hopefully they can let us know if this is good for v3.8... thx, Jason. On Thu, Nov 08, 2012 at 07:38:57AM +0100, Marek Szyprowski wrote: dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags provided by the caller

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-12 Thread Soeren Moch
On 12.11.2012 11:38, Andrew Lunn wrote: On Mon, Nov 12, 2012 at 10:48:02AM +0100, Soeren Moch wrote: On 11.11.2012 18:22, Andrew Lunn wrote: On Thu, Nov 08, 2012 at 07:38:57AM +0100, Marek Szyprowski wrote: dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-12 Thread Andrew Lunn
On Mon, Nov 12, 2012 at 10:48:02AM +0100, Soeren Moch wrote: > On 11.11.2012 18:22, Andrew Lunn wrote: > > On Thu, Nov 08, 2012 at 07:38:57AM +0100, Marek Szyprowski wrote: > >> dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, > regardless > >> th

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-12 Thread Soeren Moch
On 11.11.2012 18:22, Andrew Lunn wrote: > On Thu, Nov 08, 2012 at 07:38:57AM +0100, Marek Szyprowski wrote: >> dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless >> the flags provided by the caller. This causes excessive pruning of >> emergency mem

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-12 Thread Soeren Moch
On 11.11.2012 18:22, Andrew Lunn wrote: On Thu, Nov 08, 2012 at 07:38:57AM +0100, Marek Szyprowski wrote: dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags provided by the caller. This causes excessive pruning of emergency memory pools without any good

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-12 Thread Andrew Lunn
On Mon, Nov 12, 2012 at 10:48:02AM +0100, Soeren Moch wrote: On 11.11.2012 18:22, Andrew Lunn wrote: On Thu, Nov 08, 2012 at 07:38:57AM +0100, Marek Szyprowski wrote: dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags provided by the caller. This causes

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-12 Thread Soeren Moch
On 12.11.2012 11:38, Andrew Lunn wrote: On Mon, Nov 12, 2012 at 10:48:02AM +0100, Soeren Moch wrote: On 11.11.2012 18:22, Andrew Lunn wrote: On Thu, Nov 08, 2012 at 07:38:57AM +0100, Marek Szyprowski wrote: dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-11 Thread Andrew Lunn
On Thu, Nov 08, 2012 at 07:38:57AM +0100, Marek Szyprowski wrote: > dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless > the flags provided by the caller. This causes excessive pruning of > emergency memory pools without any good reason. This patch changes

Re: [PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-11 Thread Andrew Lunn
On Thu, Nov 08, 2012 at 07:38:57AM +0100, Marek Szyprowski wrote: dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags provided by the caller. This causes excessive pruning of emergency memory pools without any good reason. This patch changes the code

[PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-07 Thread Marek Szyprowski
dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags provided by the caller. This causes excessive pruning of emergency memory pools without any good reason. This patch changes the code to correctly use gfp flags provided by the dmapool caller. This should solve

[PATCH] mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

2012-11-07 Thread Marek Szyprowski
dmapool always calls dma_alloc_coherent() with GFP_ATOMIC flag, regardless the flags provided by the caller. This causes excessive pruning of emergency memory pools without any good reason. This patch changes the code to correctly use gfp flags provided by the dmapool caller. This should solve

Re: [PATCH] dmapool : make DMAPOOL_DEBUG detect corruption of free marker

2012-11-05 Thread Andrew Morton
(page->offset), not sizeof(int). Just in case someone changes the type of dma_page.offset. - Use pr_err(), as suggested by checkpatch. Please use checkpatch. --- a/mm/dmapool.c~dmapool-make-dmapool_debug-detect-corruption-of-free-marker-fix +++ a/mm/dmapool.c @@ -350,23 +350,24 @@ void *dma_

[PATCH] dmapool : make DMAPOOL_DEBUG detect corruption of free marker

2012-11-05 Thread Matthieu CASTET
This can help to catch case where hardware is writting after dma free. Signed-off-by: Matthieu Castet --- mm/dmapool.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/mm/dmapool.c b/mm/dmapool.c index c5ab33b..e10898a 100644 --- a/mm/dmapool.c +++ b/mm/dmapool.c

[PATCH] dmapool : make DMAPOOL_DEBUG detect corruption of free marker

2012-11-05 Thread Matthieu CASTET
This can help to catch case where hardware is writting after dma free. Signed-off-by: Matthieu Castet matthieu.cas...@parrot.com --- mm/dmapool.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/mm/dmapool.c b/mm/dmapool.c index c5ab33b..e10898a 100644 ---

Re: [PATCH] dmapool : make DMAPOOL_DEBUG detect corruption of free marker

2012-11-05 Thread Andrew Morton
is strange, it misses capitalisation and needed a grammatical fix - Use sizeof(page-offset), not sizeof(int). Just in case someone changes the type of dma_page.offset. - Use pr_err(), as suggested by checkpatch. Please use checkpatch. --- a/mm/dmapool.c~dmapool-make-dmapool_debug-detect

[PATCH] docbook: dmapool: fix fatal changed filename

2008-02-06 Thread Randy Dunlap
From: Randy Dunlap <[EMAIL PROTECTED]> Docbook fatal error, file was moved: docproc: linux-2.6.24-git15/drivers/base/dmapool.c: No such file or directory Signed-off-by: Randy Dunlap <[EMAIL PROTECTED]> --- Documentation/DocBook/kernel-api.tmpl |2 +- 1 file changed, 1 insertion(+), 1

[PATCH] docbook: dmapool: fix fatal changed filename

2008-02-06 Thread Randy Dunlap
From: Randy Dunlap [EMAIL PROTECTED] Docbook fatal error, file was moved: docproc: linux-2.6.24-git15/drivers/base/dmapool.c: No such file or directory Signed-off-by: Randy Dunlap [EMAIL PROTECTED] --- Documentation/DocBook/kernel-api.tmpl |2 +- 1 file changed, 1 insertion(+), 1

[PATCH 3/7] Avoid taking waitqueue lock in dmapool

2007-12-04 Thread Matthew Wilcox
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 <[EMAIL PROTECTED]> Acked-by: David

[PATCH 2/7] dmapool: Fix style problems

2007-12-04 Thread Matthew Wilcox
Run Lindent and fix all issues reported by checkpatch.pl Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]> --- mm/dmapool.c | 288 +- 1 files changed, 142 insertions(+), 146 deletions(-) diff --git a/mm/dmapool.c b/mm/dmapool.c index

[PATCH 5/7] dmapool: Tidy up includes and add comments

2007-12-04 Thread Matthew Wilcox
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 <[EMAIL PROTECTED]> --- mm/dmapool.c | 40

[PATCH 6/7] Change dmapool free block management

2007-12-04 Thread Matthew Wilcox
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 <[EMAIL

[PATCH 4/7] dmapool: Validate parameters to dma_pool_create

2007-12-04 Thread Matthew Wilcox
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 <[EMAIL PROTECTED]> Acked-by: David S. Miller <[EMAIL PROTECTED]> --- mm/dmapool.c | 15

dmapool patch series, version 2

2007-12-04 Thread Matthew Wilcox
/7 of this series. - I've run checkpatch.pl over the file, and fixed all the warnings/errors it reported. - And I've updated it to 2.6.24-rc4. Patches also available from: http://git.kernel.org/?p=linux/kernel/git/willy/misc.git;a=shortlog;h=dmapool I'll send all seven as a followup to this mail

dmapool patch series, version 2

2007-12-04 Thread Matthew Wilcox
and 6/7 of this series. - I've run checkpatch.pl over the file, and fixed all the warnings/errors it reported. - And I've updated it to 2.6.24-rc4. Patches also available from: http://git.kernel.org/?p=linux/kernel/git/willy/misc.git;a=shortlog;h=dmapool I'll send all seven as a followup

[PATCH 6/7] Change dmapool free block management

2007-12-04 Thread Matthew Wilcox
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 [EMAIL

[PATCH 4/7] dmapool: Validate parameters to dma_pool_create

2007-12-04 Thread Matthew Wilcox
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 [EMAIL PROTECTED] Acked-by: David S. Miller [EMAIL PROTECTED] --- mm/dmapool.c | 15

[PATCH 5/7] dmapool: Tidy up includes and add comments

2007-12-04 Thread Matthew Wilcox
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 [EMAIL PROTECTED] --- mm/dmapool.c | 40

[PATCH 2/7] dmapool: Fix style problems

2007-12-04 Thread Matthew Wilcox
Run Lindent and fix all issues reported by checkpatch.pl Signed-off-by: Matthew Wilcox [EMAIL PROTECTED] --- mm/dmapool.c | 288 +- 1 files changed, 142 insertions(+), 146 deletions(-) diff --git a/mm/dmapool.c b/mm/dmapool.c index

[PATCH 3/7] Avoid taking waitqueue lock in dmapool

2007-12-04 Thread Matthew Wilcox
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 [EMAIL PROTECTED] Acked-by: David

Re: [PATCH 4/4] dmapool: Improve memory usage for devices which can't cross boundaries

2007-09-26 Thread David Miller
From: Matthew Wilcox <[EMAIL PROTECTED]> Date: Wed, 26 Sep 2007 15:01:19 -0400 > 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 >

Re: [PATCH 3/4] Change dmapool free block management

2007-09-26 Thread David Miller
From: Matthew Wilcox <[EMAIL PROTECTED]> Date: Wed, 26 Sep 2007 15:01:18 -0400 > Also add documentation for how dma pools work, move the header above the > includes, add my copyright, add the original author's copyright, add a > GPL v2 licence to the file and fix the includes. > > Signed-off-by:

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread David Miller
From: Matthew Wilcox <[EMAIL PROTECTED]> Date: Wed, 26 Sep 2007 15:01:17 -0400 > 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

Re: [PATCH 1/4] Avoid taking waitqueue lock in dmapool

2007-09-26 Thread David Miller
From: Matthew Wilcox <[EMAIL PROTECTED]> Date: Wed, 26 Sep 2007 15:01:16 -0400 > 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 >

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread roel
Matthew Wilcox wrote: > On Wed, Sep 26, 2007 at 09:47:41PM +0200, roel wrote: >> The brackets in the first if/else are not required, and you could combine >> the two statements: > > You mean braces, not brackets. And I find this little fetish of yours > highly disturbing. I prefer to use

Re: [PATCH 4/4] dmapool: Improve memory usage for devices which can't cross boundaries

2007-09-26 Thread roel
Matthew Wilcox wrote: [...] > @@ -142,14 +144,13 @@ struct dma_pool *dma_pool_create(const char *name, > struct device *dev, > if ((size % align) != 0) > size = ALIGN(size, align); > > - if (allocation == 0) { > - if (PAGE_SIZE < size) > -

Re: [PATCH 3/4] Change dmapool free block management

2007-09-26 Thread roel
Matthew Wilcox wrote: [...] > @@ -113,9 +133,12 @@ struct dma_pool *dma_pool_create(const char *name, > struct device *dev, > return NULL; > } > > - if (size == 0) > + if (size == 0) { > return NULL; > - > + } else if (size < 4) { > +

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread roel
Matthew Wilcox wrote: > 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 <[EMAIL PROTECTED]> > --- > mm/dmapool.c | 15

Re: [PATCH 3/4] Change dmapool free block management

2007-09-26 Thread Roland Dreier
difficult to review. Also I assume the main change is "Change dmapool free block management" -- but I'm left wondering exactly how and why you're changing it. - R. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL P

[PATCH 4/4] dmapool: Improve memory usage for devices which can't cross boundaries

2007-09-26 Thread Matthew Wilcox
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

[PATCH 3/4] Change dmapool free block management

2007-09-26 Thread Matthew Wilcox
Also add documentation for how dma pools work, move the header above the includes, add my copyright, add the original author's copyright, add a GPL v2 licence to the file and fix the includes. Signed-off-by: Matthew Wilcox <[EMAIL PROTECTED]> --- mm/dmapool.c | 161

[PATCH 1/4] Avoid taking waitqueue lock in dmapool

2007-09-26 Thread Matthew Wilcox
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 <[EMAIL PROTECTED]> ---

[PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread Matthew Wilcox
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 <[EMAIL PROTECTED]> --- mm/dmapool.c | 15 --- 1 files changed, 8 insertions(+),

dmapool

2007-09-26 Thread Matthew Wilcox
I have a series of patches to dmapool that I'd like opinions on. I don't have any performance numbers yet, but some of the patches are a good idea, with or without performance numbers. One of the problems with dmapool is that it doesn't have a maintainer listed. I've spent enough time looking

dmapool

2007-09-26 Thread Matthew Wilcox
I have a series of patches to dmapool that I'd like opinions on. I don't have any performance numbers yet, but some of the patches are a good idea, with or without performance numbers. One of the problems with dmapool is that it doesn't have a maintainer listed. I've spent enough time looking

[PATCH 1/4] Avoid taking waitqueue lock in dmapool

2007-09-26 Thread Matthew Wilcox
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 [EMAIL PROTECTED] --- mm/dmapool.c

[PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread Matthew Wilcox
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 [EMAIL PROTECTED] --- mm/dmapool.c | 15 --- 1 files changed, 8 insertions(+), 7

[PATCH 3/4] Change dmapool free block management

2007-09-26 Thread Matthew Wilcox
Also add documentation for how dma pools work, move the header above the includes, add my copyright, add the original author's copyright, add a GPL v2 licence to the file and fix the includes. Signed-off-by: Matthew Wilcox [EMAIL PROTECTED] --- mm/dmapool.c | 161

[PATCH 4/4] dmapool: Improve memory usage for devices which can't cross boundaries

2007-09-26 Thread Matthew Wilcox
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

Re: [PATCH 3/4] Change dmapool free block management

2007-09-26 Thread Roland Dreier
to review. Also I assume the main change is Change dmapool free block management -- but I'm left wondering exactly how and why you're changing it. - R. - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread roel
Matthew Wilcox wrote: 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 [EMAIL PROTECTED] --- mm/dmapool.c | 15 --- 1

Re: [PATCH 3/4] Change dmapool free block management

2007-09-26 Thread roel
Matthew Wilcox wrote: [...] @@ -113,9 +133,12 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev, return NULL; } - if (size == 0) + if (size == 0) { return NULL; - + } else if (size 4) { + size = 4; +

Re: [PATCH 4/4] dmapool: Improve memory usage for devices which can't cross boundaries

2007-09-26 Thread roel
Matthew Wilcox wrote: [...] @@ -142,14 +144,13 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev, if ((size % align) != 0) size = ALIGN(size, align); - if (allocation == 0) { - if (PAGE_SIZE size) -

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread roel
Matthew Wilcox wrote: On Wed, Sep 26, 2007 at 09:47:41PM +0200, roel wrote: The brackets in the first if/else are not required, and you could combine the two statements: You mean braces, not brackets. And I find this little fetish of yours highly disturbing. I prefer to use braces, and

Re: [PATCH 1/4] Avoid taking waitqueue lock in dmapool

2007-09-26 Thread David Miller
From: Matthew Wilcox [EMAIL PROTECTED] Date: Wed, 26 Sep 2007 15:01:16 -0400 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

Re: [PATCH 2/4] dmapool: Validate parameters to dma_pool_create

2007-09-26 Thread David Miller
From: Matthew Wilcox [EMAIL PROTECTED] Date: Wed, 26 Sep 2007 15:01:17 -0400 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 [EMAIL

Re: [PATCH 3/4] Change dmapool free block management

2007-09-26 Thread David Miller
From: Matthew Wilcox [EMAIL PROTECTED] Date: Wed, 26 Sep 2007 15:01:18 -0400 Also add documentation for how dma pools work, move the header above the includes, add my copyright, add the original author's copyright, add a GPL v2 licence to the file and fix the includes. Signed-off-by:

Re: [PATCH 4/4] dmapool: Improve memory usage for devices which can't cross boundaries

2007-09-26 Thread David Miller
From: Matthew Wilcox [EMAIL PROTECTED] Date: Wed, 26 Sep 2007 15:01:19 -0400 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

[patch 3/5] dmapool: Fix "nocast type" warnings

2005-07-14 Thread domen
From: Victor Fusco <[EMAIL PROTECTED]> Fix the sparse warning "implicit cast to nocast type" File/Subsystem:drivers/base/dmapool Signed-off-by: Victor Fusco <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> -- --- drivers/base/dmapool.c |3

[patch 3/5] dmapool: Fix nocast type warnings

2005-07-14 Thread domen
From: Victor Fusco [EMAIL PROTECTED] Fix the sparse warning implicit cast to nocast type File/Subsystem:drivers/base/dmapool Signed-off-by: Victor Fusco [EMAIL PROTECTED] Signed-off-by: Domen Puncer [EMAIL PROTECTED] -- --- drivers/base/dmapool.c |3 ++- include/linux/dmapool.h |3

Re: [patch 12/14] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE

2005-03-06 Thread Andrew Morton
Nish Aravamudan <[EMAIL PROTECTED]> wrote: > > > Also, __set_current_state() can be user here: the add_wait_queue() contains > > the necessary barriers. (Grubby, but we do that in quite a few places with > > this particular code sequence (we should have an add_wait_queue() variant > > which

Re: [patch 12/14] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE

2005-03-06 Thread Nish Aravamudan
On Sun, 6 Mar 2005 19:44:14 -0800, Andrew Morton <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > > > use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE > > > > Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> > > Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> > > --- > >

Re: [patch 12/14] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE

2005-03-06 Thread Andrew Morton
[EMAIL PROTECTED] wrote: > > use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE > > Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> > Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> > --- > > > kj-domen/drivers/base/dmapool.c |2 +- > 1 files changed, 1 insertion(+), 1

[patch 12/14] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE

2005-03-06 Thread domen
use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE Signed-off-by: Nishanth Aravamudan <[EMAIL PROTECTED]> Signed-off-by: Domen Puncer <[EMAIL PROTECTED]> --- kj-domen/drivers/base/dmapool.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN

[patch 12/14] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE

2005-03-06 Thread domen
use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE Signed-off-by: Nishanth Aravamudan [EMAIL PROTECTED] Signed-off-by: Domen Puncer [EMAIL PROTECTED] --- kj-domen/drivers/base/dmapool.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN

Re: [patch 12/14] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE

2005-03-06 Thread Andrew Morton
[EMAIL PROTECTED] wrote: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE Signed-off-by: Nishanth Aravamudan [EMAIL PROTECTED] Signed-off-by: Domen Puncer [EMAIL PROTECTED] --- kj-domen/drivers/base/dmapool.c |2 +- 1 files changed, 1 insertion(+), 1 deletion(-)

Re: [patch 12/14] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE

2005-03-06 Thread Nish Aravamudan
On Sun, 6 Mar 2005 19:44:14 -0800, Andrew Morton [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE Signed-off-by: Nishanth Aravamudan [EMAIL PROTECTED] Signed-off-by: Domen Puncer [EMAIL PROTECTED] ---

Re: [patch 12/14] drivers/dmapool: use TASK_UNINTERRUPTIBLE instead of TASK_INTERRUPTIBLE

2005-03-06 Thread Andrew Morton
Nish Aravamudan [EMAIL PROTECTED] wrote: Also, __set_current_state() can be user here: the add_wait_queue() contains the necessary barriers. (Grubby, but we do that in quite a few places with this particular code sequence (we should have an add_wait_queue() variant which does the

<    1   2   3