diff options
author | Wen Gu <guwen@linux.alibaba.com> | 2024-08-14 21:08:26 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-08-20 11:38:23 +0200 |
commit | d386d59b7c1a39112ca875327339ed519df2b96c (patch) | |
tree | e2530046c766a132324e5b4b6c0da722e5b769f8 /net/smc/smc_core.h | |
parent | dca9d62a0d7684a5510645ba05960529c5066457 (diff) | |
download | linux-d386d59b7c1a39112ca875327339ed519df2b96c.tar.gz linux-d386d59b7c1a39112ca875327339ed519df2b96c.tar.bz2 linux-d386d59b7c1a39112ca875327339ed519df2b96c.zip |
net/smc: introduce statistics for allocated ringbufs of link group
Currently we have the statistics on sndbuf/RMB sizes of all connections
that have ever been on the link group, namely smc_stats_memsize. However
these statistics are incremental and since the ringbufs of link group
are allowed to be reused, we cannot know the actual allocated buffers
through these. So here introduces the statistic on actual allocated
ringbufs of the link group, it will be incremented when a new ringbuf is
added into buf_list and decremented when it is deleted from buf_list.
Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'net/smc/smc_core.h')
-rw-r--r-- | net/smc/smc_core.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h index d93cf51dbd7c..0db4e5f79ac4 100644 --- a/net/smc/smc_core.h +++ b/net/smc/smc_core.h @@ -281,6 +281,8 @@ struct smc_link_group { struct rw_semaphore sndbufs_lock; /* protects tx buffers */ struct list_head rmbs[SMC_RMBE_SIZES]; /* rx buffers */ struct rw_semaphore rmbs_lock; /* protects rx buffers */ + u64 alloc_sndbufs; /* stats of tx buffers */ + u64 alloc_rmbs; /* stats of rx buffers */ u8 id[SMC_LGR_ID_SIZE]; /* unique lgr id */ struct delayed_work free_work; /* delayed freeing of an lgr */ |