* + dmapool-speedup-dmapool_debug-with-init_on_alloc.patch added to mm-unstable branch
@ 2023-01-26 22:32 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-01-26 22:32 UTC (permalink / raw)
To: mm-commits, willy, kbusch, hch, tonyb, akpm
The patch titled
Subject: dmapool: speedup DMAPOOL_DEBUG with init_on_alloc
has been added to the -mm mm-unstable branch. Its filename is
dmapool-speedup-dmapool_debug-with-init_on_alloc.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/dmapool-speedup-dmapool_debug-with-init_on_alloc.patch
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a
reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: Tony Battersby <tonyb@cybernetics.com>
Subject: dmapool: speedup DMAPOOL_DEBUG with init_on_alloc
Date: Thu, 26 Jan 2023 13:51:18 -0800
Avoid double-memset of the same allocated memory in dma_pool_alloc() when
both DMAPOOL_DEBUG is enabled and init_on_alloc=1.
Link: https://lkml.kernel.org/r/20230126215125.4069751-6-kbusch@meta.com
Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/dmapool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/dmapool.c~dmapool-speedup-dmapool_debug-with-init_on_alloc
+++ a/mm/dmapool.c
@@ -356,7 +356,7 @@ void *dma_pool_alloc(struct dma_pool *po
break;
}
}
- if (!(mem_flags & __GFP_ZERO))
+ if (!want_init_on_alloc(mem_flags))
memset(retval, POOL_POISON_ALLOCATED, pool->size);
#endif
spin_unlock_irqrestore(&pool->lock, flags);
_
Patches currently in -mm which might be from tonyb@cybernetics.com are
dmapool-remove-checks-for-dev-==-null.patch
dmapool-use-sysfs_emit-instead-of-scnprintf.patch
dmapool-cleanup-integer-types.patch
dmapool-speedup-dmapool_debug-with-init_on_alloc.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-26 22:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-26 22:32 + dmapool-speedup-dmapool_debug-with-init_on_alloc.patch added to mm-unstable branch Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.