All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Breno Leitao <leitao@debian.org>
Cc: kuba@kernel.org, davem@davemloft.net, pabeni@redhat.com,
	edumazet@google.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, stephen@networkplumber.org,
	f.fainelli@gmail.com, Johannes Berg <johannes.berg@intel.com>,
	Martin KaFai Lau <martin.lau@kernel.org>
Subject: Re: [PATCH net-next v3] net: sysfs: Do not create sysfs for non BQL device
Date: Tue, 20 Feb 2024 08:40:33 +0000	[thread overview]
Message-ID: <20240220084033.GR40273@kernel.org> (raw)
In-Reply-To: <20240219104238.3782658-1-leitao@debian.org>

On Mon, Feb 19, 2024 at 02:42:36AM -0800, Breno Leitao wrote:
> Creation of sysfs entries is expensive, mainly for workloads that
> constantly creates netdev and netns often.
> 
> Do not create BQL sysfs entries for devices that don't need,
> basically those that do not have a real queue, i.e, devices that has
> NETIF_F_LLTX and IFF_NO_QUEUE, such as `lo` interface.
> 
> This will remove the /sys/class/net/eth0/queues/tx-X/byte_queue_limits/
> directory for these devices.
> 
> In the example below, eth0 has the `byte_queue_limits` directory but not
> `lo`.
> 
> 	# ls /sys/class/net/lo/queues/tx-0/
> 	traffic_class  tx_maxrate  tx_timeout  xps_cpus  xps_rxqs
> 
> 	# ls /sys/class/net/eth0/queues/tx-0/byte_queue_limits/
> 	hold_time  inflight  limit  limit_max  limit_min
> 
> This also removes the #ifdefs, since we can also use netdev_uses_bql() to
> check if the config is enabled. (as suggested by Jakub).
> 
> Suggested-by: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Breno Leitao <leitao@debian.org>

Thanks Breno,

I like that this removes sysfs entries for devices for which they do not
act on.  Although I understand it is not a complete solution - still not
all devices that have these entries use BQL - I think a key value there is
to alleviate potential confusion for users.  And as such, this is a step in
the right direction.

I also like that some #ifdefs disappear.

Reviewed-by: Simon Horman <horms@kernel.org>

...

  reply	other threads:[~2024-02-20  8:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-19 10:42 [PATCH net-next v3] net: sysfs: Do not create sysfs for non BQL device Breno Leitao
2024-02-20  8:40 ` Simon Horman [this message]
2024-02-20 15:40 ` Jakub Kicinski

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=20240220084033.GR40273@kernel.org \
    --to=horms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=johannes.berg@intel.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=stephen@networkplumber.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.