mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "hch@lst.de" <hch@lst.de>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"israelr@mellanox.com" <israelr@mellanox.com>,
	"sagi@grimberg.me" <sagi@grimberg.me>,
	"sebott@linux.ibm.com" <sebott@linux.ibm.com>,
	"ming.lei@redhat.com" <ming.lei@redhat.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"jianchao.w.wang@oracle.com" <jianchao.w.wang@oracle.com>,
	"maxg@mellanox.com" <maxg@mellanox.com>,
	"tj@kernel.org" <tj@kernel.org>
Subject: Re: [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again
Date: Wed, 16 May 2018 16:17:42 +0000	[thread overview]
Message-ID: <8058d72fef475caffa78c962bc4220f5f8fa3dde.camel@wdc.com> (raw)
In-Reply-To: <20180516125110.GA32078@lst.de>

On Wed, 2018-05-16 at 14:51 +0200, Christoph Hellwig wrote:
> I've been looking at this carefully, and I don't think we need cmpxchg64
> at all, and we don't need anywhere near as many cmpxchg operations either.
> 
> The only reason to include the deadline in the atomic operation is the
> blk_abort_request case, as the blk_mq_add_timer never modifies the
> deadline of a request that someone could be racing with.  So if we
> introduce a new aborted state for use by blk_abort_request we can modify
> the deadline separately (and in fact have a common field with the legacy
> path).

There is another reason the deadline is included in the atomic operation,
namely to handle races between the BLK_EH_RESET_TIMER case in blk_mq_rq_timed_out()
and blk_mq_complete_request(). I don't think that race is addressed properly by
your patch. I will see what I can do to address that race without using 64-bit
atomic operations.

Bart.

  reply	other threads:[~2018-05-16 16:17 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 22:51 [PATCH v10 0/2] " Bart Van Assche
2018-05-15 22:51 ` [PATCH v10 1/2] arch/*: Add CONFIG_ARCH_HAVE_CMPXCHG64 Bart Van Assche
2018-05-16  4:15   ` Michael Ellerman
2018-05-18 20:33   ` Palmer Dabbelt
2018-05-15 22:51 ` [PATCH v10 2/2] blk-mq: Rework blk-mq timeout handling again Bart Van Assche
2018-05-15 22:51 ` [PATCH v9 0/2] " Bart Van Assche
2018-05-15 22:51 ` [PATCH v9 1/2] arch/*: Add CONFIG_ARCH_HAVE_CMPXCHG64 Bart Van Assche
2018-05-16  6:07   ` Christoph Hellwig
2018-05-15 22:51 ` [PATCH v9 2/2] blk-mq: Rework blk-mq timeout handling again Bart Van Assche
2018-05-16 12:51   ` Christoph Hellwig
2018-05-16 16:17     ` Bart Van Assche [this message]
2018-05-16 16:24       ` hch
2018-05-16 16:47         ` Bart Van Assche
2018-05-16 17:31           ` hch
2018-05-16 18:06             ` Bart Van Assche
  -- strict thread matches above, loose matches on Subject: below --
2018-05-14 18:46 [PATCH v9 0/2] " Bart Van Assche
2018-05-14 18:46 ` [PATCH v9 2/2] " Bart Van Assche
2018-05-15 13:49   ` Sebastian Ott

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=8058d72fef475caffa78c962bc4220f5f8fa3dde.camel@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=israelr@mellanox.com \
    --cc=jianchao.w.wang@oracle.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxg@mellanox.com \
    --cc=ming.lei@redhat.com \
    --cc=sagi@grimberg.me \
    --cc=sebott@linux.ibm.com \
    --cc=tj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®