From: Breno Leitao <leitao@debian.org>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Tejun Heo <tj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
horms@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-team@meta.com
Subject: Re: [PATCH net] netconsole: Only register console drivers when targets are configured
Date: Mon, 2 Jun 2025 01:04:25 -0700 [thread overview]
Message-ID: <aD1bCTmWWrOZs+Lu@gmail.com> (raw)
In-Reply-To: <20250530193052.1bdbc879@kernel.org>
Hello Jakub,
On Fri, May 30, 2025 at 07:30:52PM -0700, Jakub Kicinski wrote:
> On Wed, 28 May 2025 10:20:19 -0700 Breno Leitao wrote:
> > The netconsole driver currently registers the basic console driver
> > unconditionally during initialization, even when only extended targets
> > are configured. This results in unnecessary console registration and
> > performance overhead, as the write_msg() callback is invoked for every
> > log message only to return early when no matching targets are found.
> >
> > Optimize the driver by conditionally registering console drivers based
> > on the actual target configuration. The basic console driver is now
> > registered only when non-extended targets exist, same as the extended
> > console. The implementation also handles dynamic target creation through
> > the configfs interface.
> >
> > This change eliminates unnecessary console driver registrations,
> > redundant write_msg() callbacks for unused console types, and associated
> > lock contention and target list iterations. The optimization is
> > particularly beneficial for systems using only the most common extended
> > console type.
> >
> > Fixes: e2f15f9a79201 ("netconsole: implement extended console support")
>
> Code makes sense but I think it's net-next material.
Sure, let me resend it (with the other patches) to net-next.
Thanks for the review,
--breno
prev parent reply other threads:[~2025-06-02 8:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-28 17:20 [PATCH net] netconsole: Only register console drivers when targets are configured Breno Leitao
2025-05-31 2:30 ` Jakub Kicinski
2025-06-02 8:04 ` Breno Leitao [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=aD1bCTmWWrOZs+Lu@gmail.com \
--to=leitao@debian.org \
--cc=akpm@linux-foundation.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kernel-team@meta.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tj@kernel.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 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.