netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net/smc: introduce ringbufs usage statistics
@ 2024-08-07  7:59 Wen Gu
  2024-08-07  7:59 ` [PATCH net-next v2 1/2] net/smc: introduce statistics for allocated ringbufs of link group Wen Gu
  2024-08-07  7:59 ` [PATCH net-next v2 2/2] net/smc: introduce statistics for ringbufs usage of net namespace Wen Gu
  0 siblings, 2 replies; 12+ messages in thread
From: Wen Gu @ 2024-08-07  7:59 UTC (permalink / raw)
  To: wenjia, jaka, davem, edumazet, kuba, pabeni
  Cc: alibuda, tonylu, guwen, linux-kernel, linux-s390, netdev

Currently, we have histograms that show the sizes of ringbufs that ever
used by SMC connections. However, they are always incremental and since
SMC allows the reuse of ringbufs, we cannot know the actual amount of
ringbufs being allocated or actively used.

So this patch set introduces statistics for the amount of ringbufs that
actually allocated by link group and actively used by connections of a
certain net namespace, so that we can react based on these memory usage
information, e.g. active fallback to TCP.

With appropriate adaptations of smc-tools, we can obtain these ringbufs
usage information:

$ smcr -d linkgroup
LG-ID    : 00000500
LG-Role  : SERV
LG-Type  : ASYML
VLAN     : 0
PNET-ID  :
Version  : 1
Conns    : 0
Sndbuf   : 12910592 B    <-
RMB      : 12910592 B    <-

or

$ smcr -d stats
[...]
RX Stats
  Data transmitted (Bytes)      869225943 (869.2M)
  Total requests                 18494479
  Buffer usage  (Bytes)          12910592 (12.31M)  <-
  [...]

TX Stats
  Data transmitted (Bytes)    12760884405 (12.76G)
  Total requests                 36988338
  Buffer usage  (Bytes)          12910592 (12.31M)  <-
  [...]
[...]

Wen Gu (2):
  net/smc: introduce statistics for allocated ringbufs of link group
  net/smc: introduce statistics for ringbufs usage of net namespace

 include/uapi/linux/smc.h |  6 ++++
 net/smc/smc_core.c       | 72 ++++++++++++++++++++++++++++++++++------
 net/smc/smc_core.h       |  2 ++
 net/smc/smc_stats.c      |  8 +++++
 net/smc/smc_stats.h      | 28 +++++++++++-----
 5 files changed, 96 insertions(+), 20 deletions(-)

-- 
2.32.0.3.g01195cf9f


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

end of thread, other threads:[~2024-08-15  6:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07  7:59 [PATCH net-next v2 0/2] net/smc: introduce ringbufs usage statistics Wen Gu
2024-08-07  7:59 ` [PATCH net-next v2 1/2] net/smc: introduce statistics for allocated ringbufs of link group Wen Gu
2024-08-13  0:41   ` Jakub Kicinski
2024-08-13  9:55     ` Wen Gu
2024-08-13 14:40       ` Jakub Kicinski
2024-08-13 15:13         ` Ido Schimmel
2024-08-14  3:12           ` Wen Gu
2024-08-14 14:48             ` Jakub Kicinski
2024-08-15  6:51               ` Wen Gu
2024-08-14  3:10         ` Wen Gu
2024-08-14 14:50           ` Jakub Kicinski
2024-08-07  7:59 ` [PATCH net-next v2 2/2] net/smc: introduce statistics for ringbufs usage of net namespace Wen Gu

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).