LKML Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH -next] mm/kmemleak: increase the max mem pool to 1M
@ 2019-08-14 18:32 Qian Cai
  2019-08-15  8:58 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Qian Cai @ 2019-08-14 18:32 UTC (permalink / raw)
  To: akpm; +Cc: catalin.marinas, linux-mm, linux-kernel, Qian Cai

There are some machines with slow disk and fast CPUs. When they are
under memory pressure, it could take a long time to swap before the OOM
kicks in to free up some memory. As the results, it needs a large
mem pool for kmemleak or suffering from higher chance of a kmemleak
metadata allocation failure. 524288 proves to be the good number for all
architectures here. Increase the upper bound to 1M to leave some room
for the future.

Signed-off-by: Qian Cai <cai@lca.pw>
---
 lib/Kconfig.debug | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index e80a745a11e2..d962c72a8bb5 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -595,7 +595,7 @@ config DEBUG_KMEMLEAK
 config DEBUG_KMEMLEAK_MEM_POOL_SIZE
 	int "Kmemleak memory pool size"
 	depends on DEBUG_KMEMLEAK
-	range 200 40000
+	range 200 1000000
 	default 16000
 	help
 	  Kmemleak must track all the memory allocations to avoid
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] mm/kmemleak: increase the max mem pool to 1M
  2019-08-14 18:32 [PATCH -next] mm/kmemleak: increase the max mem pool to 1M Qian Cai
@ 2019-08-15  8:58 ` Catalin Marinas
  0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2019-08-15  8:58 UTC (permalink / raw)
  To: Qian Cai; +Cc: akpm, linux-mm, linux-kernel

On Wed, Aug 14, 2019 at 02:32:52PM -0400, Qian Cai wrote:
> There are some machines with slow disk and fast CPUs. When they are
> under memory pressure, it could take a long time to swap before the OOM
> kicks in to free up some memory. As the results, it needs a large
> mem pool for kmemleak or suffering from higher chance of a kmemleak
> metadata allocation failure. 524288 proves to be the good number for all
> architectures here. Increase the upper bound to 1M to leave some room
> for the future.
> 
> Signed-off-by: Qian Cai <cai@lca.pw>

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-14 18:32 [PATCH -next] mm/kmemleak: increase the max mem pool to 1M Qian Cai
2019-08-15  8:58 ` Catalin Marinas

LKML Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/lkml/0 lkml/git/0.git
	git clone --mirror https://lore.kernel.org/lkml/1 lkml/git/1.git
	git clone --mirror https://lore.kernel.org/lkml/2 lkml/git/2.git
	git clone --mirror https://lore.kernel.org/lkml/3 lkml/git/3.git
	git clone --mirror https://lore.kernel.org/lkml/4 lkml/git/4.git
	git clone --mirror https://lore.kernel.org/lkml/5 lkml/git/5.git
	git clone --mirror https://lore.kernel.org/lkml/6 lkml/git/6.git
	git clone --mirror https://lore.kernel.org/lkml/7 lkml/git/7.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ https://lore.kernel.org/lkml \
		linux-kernel@vger.kernel.org linux-kernel@archiver.kernel.org
	public-inbox-index lkml


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox