lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 20 Feb 2024 08:40:33 +0000
From: Simon Horman <horms@...nel.org>
To: Breno Leitao <leitao@...ian.org>
Cc: kuba@...nel.org, davem@...emloft.net, pabeni@...hat.com,
	edumazet@...gle.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, stephen@...workplumber.org,
	f.fainelli@...il.com, Johannes Berg <johannes.berg@...el.com>,
	Martin KaFai Lau <martin.lau@...nel.org>
Subject: Re: [PATCH net-next v3] net: sysfs: Do not create sysfs for non BQL
 device

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@...gle.com>
> Signed-off-by: Breno Leitao <leitao@...ian.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@...nel.org>

..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ