linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: zhang fangzheng <fangzheng.zhang1003@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Fangzheng Zhang <fangzheng.zhang@unisoc.com>,
	Christoph Lameter <cl@linux.com>,
	 Pekka Enberg <penberg@kernel.org>,
	David Rientjes <rientjes@google.com>,
	 Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Vlastimil Babka <vbabka@suse.cz>,
	Roman Gushchin <roman.gushchin@linux.dev>,
	 Hyeonggon Yoo <42.hyeyoo@gmail.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	 tkjos@google.com, Yuming Han <yuming.han@unisoc.com>
Subject: Re: [PATCH 1/2] mm/slub: Add panic function when slub leaks
Date: Wed, 25 Sep 2024 20:45:03 +0800	[thread overview]
Message-ID: <CA+kNDJ+WKR=5zDhwpqf_yr+Z1HRtMPnACRyDGmDhZo45eKagVw@mail.gmail.com> (raw)
In-Reply-To: <2024092556-tribunal-next-84ce@gregkh>

On Wed, Sep 25, 2024 at 4:10 PM Greg KH <gregkh@linuxfoundation.org> wrote:
>
> On Wed, Sep 25, 2024 at 11:22:55AM +0800, Fangzheng Zhang wrote:
> > Perform real-time memory usage monitoring on the slub page
> > allocation paths, ie, kmalloc_large_alloced and alloc_slab_page.
> > When the usage exceeds the set threshole value, the panic function
> > will be triggered.
> >
> > Signed-off-by: Fangzheng Zhang <fangzheng.zhang@unisoc.com>
> > ---
> >  mm/Kconfig | 11 ++++++++
> >  mm/slub.c  | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 87 insertions(+)
> >
> > diff --git a/mm/Kconfig b/mm/Kconfig
> > index 09aebca1cae3..60cf72d4f0da 100644
> > --- a/mm/Kconfig
> > +++ b/mm/Kconfig
> > @@ -255,6 +255,17 @@ config SLUB_TINY
> >
> >          If unsure, say N.
> >
> > +config SLUB_LEAK_PANIC
> > +     bool "Trigger panic when slub leaks"
> > +     default y
>
> "default y" is only there if the feature is required to boot the machine
> properly.  That's not the case here, sorry.
>
> thanks,
>
> greg k-h

Hi Greg,

The reason why the "default y" is set here is that config is only valid for
the functional code that works. To truly implement slub_leak_panic, the
parameters must be set effectively. And, the current parameters are all
in the default n.

Thanks.


  reply	other threads:[~2024-09-25 12:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-25  3:22 [PATCH 0/2] Introduce " Fangzheng Zhang
2024-09-25  3:22 ` [PATCH 1/2] mm/slub: Add " Fangzheng Zhang
2024-09-25  8:10   ` Greg KH
2024-09-25 12:45     ` zhang fangzheng [this message]
2024-09-25  8:10   ` Greg KH
2024-09-25 11:39   ` kernel test robot
2024-09-25 12:10   ` kernel test robot
2024-09-25  3:22 ` [PATCH 2/2] Documentation: admin-guide: kernel-parameters: Add parameter description for slub_leak_panic function Fangzheng Zhang
2024-09-25 13:18 ` [PATCH 0/2] Introduce panic function when slub leaks Hyeonggon Yoo
2024-09-26 12:30   ` Vlastimil Babka
2024-09-27  7:28     ` zhang fangzheng
2024-09-27  8:01       ` Hyeonggon Yoo
2024-10-09  1:25         ` 答复: " 韩玉明 (Yuming Han)

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='CA+kNDJ+WKR=5zDhwpqf_yr+Z1HRtMPnACRyDGmDhZo45eKagVw@mail.gmail.com' \
    --to=fangzheng.zhang1003@gmail.com \
    --cc=42.hyeyoo@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=fangzheng.zhang@unisoc.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@kernel.org \
    --cc=rientjes@google.com \
    --cc=roman.gushchin@linux.dev \
    --cc=tkjos@google.com \
    --cc=vbabka@suse.cz \
    --cc=yuming.han@unisoc.com \
    /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