From: "dust.li" <dust.li@linux.alibaba.com>
To: Karsten Graul <kgraul@linux.ibm.com>,
Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Stefan Raspl <raspl@linux.ibm.com>,
Tony Lu <tonylu@linux.alibaba.com>,
kuba@kernel.org, davem@davemloft.net, netdev@vger.kernel.org,
linux-s390@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] net/smc: Add autocork support
Date: Sat, 26 Feb 2022 07:42:11 +0800 [thread overview]
Message-ID: <20220225234211.GA5282@linux.alibaba.com> (raw)
In-Reply-To: <f2afb775-a156-2c32-a49a-225545dc2bf7@linux.ibm.com>
On Fri, Feb 25, 2022 at 07:10:40PM +0100, Karsten Graul wrote:
>On 24/02/2022 03:02, dust.li wrote:
>> On Wed, Feb 23, 2022 at 07:57:31PM +0100, Karsten Graul wrote:
>>> On 19/02/2022 00:42, dust.li wrote:
>>>> On Fri, Feb 18, 2022 at 05:03:56PM +0100, Karsten Graul wrote:
>>>>> Right now for me it looks like there is no way to use netlink for container runtime
>>>>> configuration, which is a pity.
>>>>> We continue our discussions about this in the team, and also here on the list.
>>>>
>>>> Many thanks for your time on this topic !
>>>
>>> We checked more specs (like Container Network Interface (CNI) Specification)
>>> but all we found uses sysctl at the end. There is lot of infrastructure
>>> to use sysctls in a container environment.
>>>
>>> Establishing netlink-like controls for containers is by far out of our scope, and
>>> would take a long time until it would be available in the popular projects.
>>>
>>> So at the moment I see no alternative to an additional sysctl interface in the
>>> SMC module that provides controls which are useful in container environments.
>>
>> Got it, I will add sysctl interface and a switch with this function.
>>
>> Thank again !
>
>Can you explain again why this auto_cork needs a switch to disable it?
>My understanding is that this auto_cork makes always sense and is triggered
>when there are not enough resources.
My initial intention to provide a switch is to be like TCP to let user
to disable it. For user cases like debug and workaround bugs if it is
associated with auto cork, or compare performance like I did (But this
should not be a real world case in production environment).
But after Stefan suggested that we make the auto corked size turnable,
I realized that we can only need one sysctl switch: which tunes the auto
corked bytes size. Disable auto cork can be archived by setting this to 0.
Something like this bellow:
static bool smc_should_autocork(struct smc_sock *smc)
{
struct smc_connection *conn = &smc->conn;
int corking_size;
corking_size = min(sock_net(&smc->sk)->smc.sysctl_autocorking_size,
conn->sndbuf_desc->len >> 1);
if (atomic_read(&conn->cdc_pend_tx_wr) == 0 ||
smc_tx_prepared_sends(conn) > corking_size)
return false;
return true;
}
Thanks.
prev parent reply other threads:[~2022-02-25 23:42 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-16 3:49 [PATCH] net/smc: Add autocork support Dust Li
2022-02-16 3:53 ` dust.li
2022-02-16 10:32 ` Karsten Graul
2022-02-16 10:55 ` dust.li
2022-02-16 13:58 ` Stefan Raspl
2022-02-16 15:27 ` dust.li
2022-02-17 9:37 ` Stefan Raspl
2022-02-17 13:22 ` dust.li
2022-02-17 18:15 ` Hendrik Brueckner
2022-02-18 7:33 ` dust.li
2022-02-18 16:03 ` Karsten Graul
2022-02-18 23:42 ` dust.li
2022-02-23 18:57 ` Karsten Graul
2022-02-24 2:02 ` dust.li
2022-02-25 18:10 ` Karsten Graul
2022-02-25 23:42 ` dust.li [this message]
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=20220225234211.GA5282@linux.alibaba.com \
--to=dust.li@linux.alibaba.com \
--cc=brueckner@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.ibm.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;
as well as URLs for NNTP newsgroup(s).