Skip to content

Commit

Permalink
mm/dmapool.c: revert "make dma pool to use kmalloc_node"
Browse files Browse the repository at this point in the history
This reverts commit 2618c60 ("dma: make dma pool to use
kmalloc_node").

While working myself into the dmapool code I've found this little odd
kmalloc_node().

What basically happens here is that we allocate the housekeeping
structure on the numa node where the device is attached to.  Since the
device is never doing DMA to or from that memory this doesn't seem to
make sense at all.

So while this doesn't seem to cause much harm it's probably cleaner to
revert the change for consistency.

Link: https://lkml.kernel.org/r/20211221110724.97664-1-christian.koenig@amd.com
Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: Yinghai Lu <yinghai.lu@sun.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Christian König authored and Linus Torvalds committed Jan 15, 2022
1 parent d08d2b6 commit cc6266f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/dmapool.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct dma_pool *dma_pool_create(const char *name, struct device *dev,
else if ((boundary < size) || (boundary & (boundary - 1)))
return NULL;

retval = kmalloc_node(sizeof(*retval), GFP_KERNEL, dev_to_node(dev));
retval = kmalloc(sizeof(*retval), GFP_KERNEL);
if (!retval)
return retval;

Expand Down

0 comments on commit cc6266f

Please sign in to comment.