public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wenjia Zhang <wenjia@linux.ibm.com>
To: Wen Gu <guwen@linux.alibaba.com>,
	kgraul@linux.ibm.com, jaka@linux.ibm.com, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com
Cc: alibuda@linux.alibaba.com, tonylu@linux.alibaba.com,
	linux-s390@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH net-next] net/smc: Introduce SMC-related proc files
Date: Mon, 11 Sep 2023 13:54:15 +0200	[thread overview]
Message-ID: <2b1d129c-06e2-0161-7c8a-1e930150d797@linux.ibm.com> (raw)
In-Reply-To: <1694416820-60340-1-git-send-email-guwen@linux.alibaba.com>



On 11.09.23 09:20, Wen Gu wrote:
> This patch introduces /proc/net/smc4 and /proc/net/smc6 files to report
> statistic information of SMC connections.
> 
> Compared with 'smcss' command in smc-tools, getting SMC connections via
> proc files is not efficient. However, in some container scenarios, some
> dependencies are lacked for compiling and using smc-tools. In this case,
> using proc files to check SMC connections becomes a simple and fast way.
> 
> Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
> ---
>   include/net/smc.h  |   5 +-
>   net/smc/Makefile   |   2 +-
>   net/smc/af_smc.c   |  22 ++++-
>   net/smc/smc_diag.c |  29 +++---
>   net/smc/smc_proc.c | 283 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>   net/smc/smc_proc.h |  35 +++++++
>   6 files changed, 355 insertions(+), 21 deletions(-)
>   create mode 100644 net/smc/smc_proc.c
>   create mode 100644 net/smc/smc_proc.h
> 

Hi Wen,

I can understand your problem and frustration. However, there are two 
reasons I'm not really convinced by the proc file method:
1) AFAI, the proc method could consume many CPU time especially in case 
with a log of sockets to read the pseudo files.
2) We have already implemented the complex netlink method on the same 
purpose. I see the double expense to main the code.

Then the question is if the lack of dependency issue can be handle 
somehow, or the proc method is the only way to achieve this purpose?

Any opinion is welcome!

Thanks,
Wenjia

  reply	other threads:[~2023-09-11 21:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-11  7:20 [RFC PATCH net-next] net/smc: Introduce SMC-related proc files Wen Gu
2023-09-11 11:54 ` Wenjia Zhang [this message]
2023-09-13  9:53   ` Wen Gu
2023-09-14 10:29     ` Alexandra Winter
2023-09-15  1:58       ` Wen Gu

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=2b1d129c-06e2-0161-7c8a-1e930150d797@linux.ibm.com \
    --to=wenjia@linux.ibm.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=guwen@linux.alibaba.com \
    --cc=jaka@linux.ibm.com \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tonylu@linux.alibaba.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox