From: Pavan Kondeti <quic_pkondeti@quicinc.com>
To: Bibek Kumar Patro <quic_bibekkum@quicinc.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
<linux-kernel@vger.kernel.org>,
Pavan Kondeti <quic_pkondeti@quicinc.com>,
<quic_charante@quicinc.com>
Subject: Re: [PATCH v2] cma: introduce CMA_ALLOC_DEBUG config
Date: Mon, 28 Aug 2023 08:48:23 +0530 [thread overview]
Message-ID: <5df81e82-a4b9-42b8-92ce-daa194016740@quicinc.com> (raw)
In-Reply-To: <9ab7df09-e128-4940-ace5-0cc5ffa1ec4d@quicinc.com>
On Fri, Aug 25, 2023 at 06:38:13PM +0530, Bibek Kumar Patro wrote:
> On 8/14/2023 8:30 AM, Pavan Kondeti wrote:
> > Bibek,
> >
> > On Thu, Aug 10, 2023 at 09:54:51AM -0700, Andrew Morton wrote:
> > > On Wed, 9 Aug 2023 18:46:40 +0530 Bibek Kumar Patro <quic_bibekkum@quicinc.com> wrote:
> > >
> > > > Currently enabling CONFIG_CMA_DEBUG enables DEBUG preprocessor macro.
> > > > If DEBUG is defined, it's equivalent to a printk with KERN_DEBUG loglevel
> > > > flooding the dmesg buffer with pr_debug prints from mm/cma driver and from
> > > > included files as well. This results in excessive amount of CMA logging and
> > > > also might distract the debug teams with unrelated KERN_DEBUG prints.One of
> > > > the ways engineers currently tackle this problem is by passing loglevel=N
> > > > though commandline to suppress KERN_DEBUG messages. This approach can
> > > > sometimes become tiresome due to its repetitive nature.
> > > > This patch proposes an alternative approach by introducing a simple new
> > > > config CONFIG_CMA_ALLOC_DEBUG which only shows the cma bit allocation
> > > > status in case of cma failure and do not enable DEBUG preprocessor macro
> > > > from CONFIG_CMA_DEBUG avoiding excessive CMA logging from pr_debug.
> > > > Engineers and tech teams seeking only for bitmap status in case of cma
> > > > failure can use this simple config instead of worrying about changing
> > > > the loglevel or trying other similar workarounds.
> > >
> > > Would it be better to control this at runtime? With a /proc or /sys tunable?
> >
>
> Thanks Andrew for suggestion and Pavan for the details, tunable approach
> looks viable too since we get to control this during runtime, but had
> one query in mind where your inputs would help. In case any engineer wishes
> to check boot time CMA failures, would it be easier to use a
> CONFIG or /proc , /sys tunable?
> (Assuming for /proc or /sys tunable, one has to modify the
> init/post_boot scripts to mount the fs and set the tunable to true )
>
Good point about on how to enable this during boot. A sysctl knob is
good here since it can be turned on/off via kernel commandline. This
means, you don't need to modify the kernel image and wait for the
userspace to come up. See
Documentation/admin-guide/kernel-parameters.txt (grep for sysctl) for
more details.
Thanks,
Pavan
prev parent reply other threads:[~2023-08-28 3:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 13:16 Bibek Kumar Patro
2023-08-09 13:57 ` Bibek Kumar Patro
2023-08-10 16:54 ` Andrew Morton
2023-08-11 6:54 ` Bibek Kumar Patro
2023-08-14 3:00 ` Pavan Kondeti
2023-08-25 13:08 ` Bibek Kumar Patro
2023-08-28 3:18 ` Pavan Kondeti [this message]
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=5df81e82-a4b9-42b8-92ce-daa194016740@quicinc.com \
--to=quic_pkondeti@quicinc.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=quic_bibekkum@quicinc.com \
--cc=quic_charante@quicinc.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