Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Christoph Hellwig <hch@lst.de>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"Engel, Amit" <Amit.Engel@Dell.com>
Subject: Re: [PATCH] nvmet: Set ctrl->kato to a default NVMET_DISC_KATO value
Date: Tue, 15 Sep 2020 08:43:58 +0200	[thread overview]
Message-ID: <20200915064358.GA19535@lst.de> (raw)
In-Reply-To: <4291dca3-618a-c6a6-8374-950f6cbb6af9@grimberg.me>

On Mon, Sep 14, 2020 at 04:53:47PM -0700, Sagi Grimberg wrote:
>
>> Hi Sagi,
>> Still dealing with keep-alive timeout  zero value and how it affects other scenarios:
>> With my latest patch, when keep alive timeout is set to zero the keep-alive timer is disabled. (Upstream commit 0d3b6a8d213a30387b5104b2fb25376d18636f23)
>> But that’s only part of the picture,
>> What happens if a user starts with kato > 0 and modifying it by set feature a while after?
>> After modifying the kato to 0 with a set features we will never stop the timer
>> In a similar way, when starting with kato 0 and then modify to kato > 0 we will never start the timer
>>
>> We thought about solve it by adding checks in ‘nvmet_set_feat_kato’ for the above cases
>> And handle the ka_work accordingly
>> What do you think ?
>
> We can probably just cancel and restart the keep alive timer in that
> case..

Yes, the Set Features handler should:

 (1) cancel the timer
 (2) update it to the new value
 (3) start the timer again (nvmet_start_keep_alive_timer will handle
     the kato == 0 case)

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  reply	other threads:[~2020-09-15  6:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18  6:51 [PATCH] nvmet: Set ctrl->kato to a default NVMET_DISC_KATO value amit.engel
2020-08-18 16:27 ` Christoph Hellwig
2020-08-18 20:54   ` Sagi Grimberg
2020-08-18 20:58     ` Sagi Grimberg
2020-08-19  7:15       ` Engel, Amit
2020-08-19 14:29       ` Engel, Amit
2020-08-19 15:24         ` Sagi Grimberg
2020-08-19 16:04           ` Engel, Amit
2020-09-13 15:18             ` Engel, Amit
2020-09-14 23:53               ` Sagi Grimberg
2020-09-15  6:43                 ` Christoph Hellwig [this message]
2020-09-15  7:00                   ` Engel, Amit

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=20200915064358.GA19535@lst.de \
    --to=hch@lst.de \
    --cc=Amit.Engel@Dell.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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