All of lore.kernel.org
 help / color / mirror / Atom feed
From: Xiubo Li <xiubli@redhat.com>
To: target-devel@vger.kernel.org
Subject: Re: [PATCH v3] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes
Date: Thu, 22 Nov 2018 02:46:26 +0000	[thread overview]
Message-ID: <30975bc7-b986-8b1b-746a-3aab360e75a0@redhat.com> (raw)
In-Reply-To: <20181017075436.2323-1-xiubli@redhat.com>

On 2018/11/22 0:37, Mike Christie wrote:
> On 11/20/2018 11:37 PM, Xiubo Li wrote:
>> [...]
>>>> -    is_running = list_empty(&cmd->cmdr_queue_entry);
>>>> +    is_running = test_bit(TCMU_CMD_BIT_INFLIGHT, &cmd->flags);
>>>>        se_cmd = cmd->se_cmd;
>>>>          if (is_running) {
>>>> @@ -1289,7 +1319,6 @@ static int tcmu_check_expired_cmd(int id, void
>>>> *p, void *data)
>>>>            scsi_status = SAM_STAT_CHECK_CONDITION;
>>>>        } else {
>>>>            list_del_init(&cmd->cmdr_queue_entry);
>>> Move this list_del_init call to outside the if/else.
>>>
>>> You need do delete it from the cmdr_inflight_queue if that is how it
>>> timed out, or if you later call tcmu_get_next_deadline it will still
>>> show up and possibly be used to set the next time out which already
>>> happened.
>> Firstly, this is in the timeout routine, if this cmd was already timed
>> out and it must be time_after(jiffies, cmd->deadline), so it won't be
>> used again.
> It could be stuck a long time. What about jiffies rollover?

Okay, will update this.

Thanks.

      parent reply	other threads:[~2018-11-22  2:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17  7:54 [PATCH v3] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes xiubli
2018-11-21  3:19 ` Mike Christie
2018-11-21  5:37 ` Xiubo Li
2018-11-21 16:37 ` Mike Christie
2018-11-22  2:46 ` Xiubo 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=30975bc7-b986-8b1b-746a-3aab360e75a0@redhat.com \
    --to=xiubli@redhat.com \
    --cc=target-devel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.