public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Mingbao Sun <sunmingbao@tom.com>
Cc: Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@kernel.org>,
	Jens Axboe <axboe@fb.com>, Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
	tyler.sun@dell.com, ping.gan@dell.com, yanxiu.cai@dell.com,
	libin.zhang@dell.com, ao.sun@dell.com
Subject: Re: [PATCH v2 1/2] nvmet-tcp: support specifying the congestion-control
Date: Thu, 10 Mar 2022 09:38:11 +0100	[thread overview]
Message-ID: <20220310083811.GA26953@lst.de> (raw)
In-Reply-To: <20220309175203.00006ee2@tom.com>

On Wed, Mar 09, 2022 at 05:52:03PM +0800, Mingbao Sun wrote:
> On Wed, 9 Mar 2022 07:15:41 +0100
> Christoph Hellwig <hch@lst.de> wrote:
> 
> > On Wed, Mar 09, 2022 at 01:37:11PM +0800, Mingbao Sun wrote:
> > > +		if (port->nport->tcp_congestion) {
> > > +			icsk_new = inet_csk(newsock->sk);
> > > +			if (icsk_new->icsk_ca_ops != icsk->icsk_ca_ops) {
> > > +				pr_warn("congestion abnormal: expected %s, actual %s.\n",
> > > +					icsk->icsk_ca_ops->name,
> > > +					icsk_new->icsk_ca_ops->name);
> > > +			}
> > > +		}  
> > 
> > What is the point of having this code?
> 
> Well, this could happen in certain circumstances.
> Take the result from my test as an example:
> 
>     - The congestion of the listening socket of the target was set to
>       ‘dctcp’.
> 
>     - But the congestion of the socket of the host side was set to
>       ‘cubic’.
> 
>     - Then the congestion of the socket of the new connection at the
>       target side would automatically be altered to ‘dctcp-reno’.
> 
> In case tcp_congestion was explicitly set for the target, it can be
> supposed that the user attaches great importance to performance.
> So we’d better make the users aware that the system is not working
> in the way they expect. 

A warning message really seems very severe for a condition like this.
Maybe the better interface is a way to figure out which congestion
control algorithm is in use by reading a sysfs file.

  reply	other threads:[~2022-03-10  8:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-09  5:37 [PATCH v2 1/2] nvmet-tcp: support specifying the congestion-control Mingbao Sun
2022-03-09  6:02 ` Mingbao Sun
2022-03-09  6:15 ` Christoph Hellwig
2022-03-09  9:52   ` Mingbao Sun
2022-03-10  8:38     ` Christoph Hellwig [this message]
2022-03-10 11:06       ` Mingbao Sun
2022-03-10 11:35         ` Mingbao Sun
2022-03-10 14:20         ` Christoph Hellwig
2022-03-10 15:13           ` Mingbao Sun

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=20220310083811.GA26953@lst.de \
    --to=hch@lst.de \
    --cc=ao.sun@dell.com \
    --cc=axboe@fb.com \
    --cc=kbusch@kernel.org \
    --cc=kch@nvidia.com \
    --cc=libin.zhang@dell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ping.gan@dell.com \
    --cc=sagi@grimberg.me \
    --cc=sunmingbao@tom.com \
    --cc=tyler.sun@dell.com \
    --cc=yanxiu.cai@dell.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