linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Qian Cai <cai@lca.pw>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Michal Hocko <mhocko@kernel.org>,
	Matthew Wilcox <willy@infradead.org>
Subject: Re: [PATCH v2] mm: kmemleak: Use mempool allocations for kmemleak objects
Date: Tue, 30 Jul 2019 13:39:39 -0700	[thread overview]
Message-ID: <20190730133939.2840b742408336e2a0a9f573@linux-foundation.org> (raw)
In-Reply-To: <1564518157.11067.34.camel@lca.pw>

On Tue, 30 Jul 2019 16:22:37 -0400 Qian Cai <cai@lca.pw> wrote:

> On Tue, 2019-07-30 at 12:57 -0700, Andrew Morton wrote:
> > On Sat, 27 Jul 2019 14:23:33 +0100 Catalin Marinas <catalin.marinas@arm.com>
> > wrote:
> > 
> > > Add mempool allocations for struct kmemleak_object and
> > > kmemleak_scan_area as slightly more resilient than kmem_cache_alloc()
> > > under memory pressure. Additionally, mask out all the gfp flags passed
> > > to kmemleak other than GFP_KERNEL|GFP_ATOMIC.
> > > 
> > > A boot-time tuning parameter (kmemleak.mempool) is added to allow a
> > > different minimum pool size (defaulting to NR_CPUS * 4).
> > 
> > Why would anyone ever want to alter this?  Is there some particular
> > misbehaviour which this will improve?  If so, what is it?
> 
> So it can tolerant different systems and workloads. For example, 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 mempool for kmemleak or suffering from higher
> chance of a kmemleak metadata allocation failure.

This sort of thing should be in the changelog and in the user-facing
documentation please.  Also, we should document the user-visible
effects of this failure so that users can determine whether this tunable
will help them.


  reply	other threads:[~2019-07-30 20:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-27 13:23 [PATCH v2] mm: kmemleak: Use mempool allocations for kmemleak objects Catalin Marinas
2019-07-30 19:57 ` Andrew Morton
2019-07-30 20:22   ` Qian Cai
2019-07-30 20:39     ` Andrew Morton [this message]
2019-07-31  9:53     ` Catalin Marinas
2019-07-31 12:02       ` Qian Cai
2019-07-31 14:48         ` Catalin Marinas
2019-07-31 14:54           ` Qian Cai
2019-07-31  9:06   ` Michal Hocko
2019-07-31  9:17     ` Catalin Marinas
2019-07-30 20:02 ` Andrew Morton
2019-07-31 15:44   ` Catalin Marinas
2019-08-01  6:41     ` Michal Hocko
2019-08-03 10:48       ` Catalin Marinas
2019-07-31  9:10 ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190730133939.2840b742408336e2a0a9f573@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=cai@lca.pw \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).