netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] net : dqs: optimize if stall threshold is not set
@ 2024-04-08 17:25 Breno Leitao
  2024-04-08 17:25 ` [PATCH net-next v2 1/4] net: dql: Avoid calling BUG() when WARN() is enough Breno Leitao
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Breno Leitao @ 2024-04-08 17:25 UTC (permalink / raw)
  To: kuba, davem, pabeni, edumazet; +Cc: linux-kernel, netdev

Here are four patches aimed at enhancing the Dynamic Queue Limit (DQL)
subsystem within the networking stack.

The first two commits involve code refactoring, while the third patch
introduces the actual change. The fourth patch just improves the cache
locality.

Typically, when DQL is enabled, stall information is always populated
through dql_queue_stall(). However, this information is only necessary
if a stall threshold is set, which is stored in struct dql->stall_thrs.

Although dql_queue_stall() is relatively inexpensive, it is not entirely
free due to memory barriers and similar overheads.

To optimize performance, refrain from calling dql_queue_stall() when no
stall threshold is set, thus avoiding the processing of unnecessary
information.

Changelog:

v1:
	* https://lore.kernel.org/all/20240404145939.3601097-1-leitao@debian.org/
v2:
	* Moved the stall_thrs to the very first cache line, as a new
	  patch. Suggested by Eric Dumazet.


Breno Leitao (4):
  net: dql: Avoid calling BUG() when WARN() is enough
  net: dql: Separate queue function responsibilities
  net: dql: Optimize stall information population
  net: dqs: make struct dql more cache efficient

 include/linux/dynamic_queue_limits.h | 50 +++++++++++++++++-----------
 1 file changed, 30 insertions(+), 20 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-11  1:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08 17:25 [PATCH v2 0/4] net : dqs: optimize if stall threshold is not set Breno Leitao
2024-04-08 17:25 ` [PATCH net-next v2 1/4] net: dql: Avoid calling BUG() when WARN() is enough Breno Leitao
2024-04-08 17:25 ` [PATCH net-next v2 2/4] net: dql: Separate queue function responsibilities Breno Leitao
2024-04-08 17:25 ` [PATCH net-next v2 3/4] net: dql: Optimize stall information population Breno Leitao
2024-04-08 17:25 ` [PATCH net-next v2 4/4] net: dqs: make struct dql more cache efficient Breno Leitao
2024-04-10  0:21   ` Jakub Kicinski
2024-04-10 13:52     ` Breno Leitao
2024-04-11  1:45       ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).