All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@wdc.com>
To: "keith.busch@linux.intel.com" <keith.busch@linux.intel.com>
Cc: "hch@lst.de" <hch@lst.de>,
	"keith.busch@intel.com" <keith.busch@intel.com>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"ming.lei@redhat.com" <ming.lei@redhat.com>
Subject: Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce
Date: Tue, 22 May 2018 16:29:07 +0000	[thread overview]
Message-ID: <d73bd0b081dbf2156e7b20df4f85e1db38785b0b.camel@wdc.com> (raw)
In-Reply-To: <20180522141507.GQ5528@localhost.localdomain>

T24gVHVlLCAyMDE4LTA1LTIyIGF0IDA4OjE1IC0wNjAwLCBLZWl0aCBCdXNjaCB3cm90ZToNCj4g
VGhpcyBzaG91bGRuJ3QgYmUgaW50cm9kdWNpbmcgYW55IG5ldyBjb25jb3JyZW50IGNhbGxzIHRv
DQo+IF9fYmxrX21xX2NvbXBsZXRlX3JlcXVlc3QgaWYgdGhleSBkb24ndCBhbHJlYWR5IGV4aXN0
LiBUaGUgdGltZW91dCB3b3JrDQo+IGNhbGxzIGl0IG9ubHkgaWYgdGhlIGRyaXZlcidzIHRpbWVv
dXQgcmV0dXJucyBCTEtfRUhfSEFORExFRCwgd2hpY2ggbWVhbnMNCj4gdGhlIGRyaXZlciBpcyBj
bGFpbWluZyB0aGUgY29tbWFuZCBpcyBub3cgZG9uZSwgYnV0IHRoZSBkcml2ZXIgZGlkbid0IGNh
bGwNCj4gYmxrX21xX2NvbXBsZXRlX3JlcXVlc3QgYXMgaW5kaWNhdGVkIGJ5IHRoZSByZXF1ZXN0
J3MgSU5fRkxJR0hUIHN0YXRlLg0KPiANCj4gSW4gb3JkZXIgdG8gZ2V0IGEgc2Vjb25kIGNhbGwg
dG8gX19ibGtfbXFfY29tcGxldGVfcmVxdWVzdCgpLCB0aGVuLA0KPiB0aGUgZHJpdmVyIHdvdWxk
IGhhdmUgdG8gZW5kIHVwIGNhbGxpbmcgYmxrX21xX2NvbXBsZXRlX3JlcXVlc3QoKQ0KPiBpbiBh
bm90aGVyIGNvbnRleHQuIEJ1dCB0aGVyZSdzIG5vdGhpbmcgc3RvcHBpbmcgdGhhdCBmcm9tIGhh
cHBlbmluZw0KPiB0b2RheSwgYW5kIHdvdWxkIGJlIGJhZCBpZiBhbnkgZHJpdmVyIGFjdHVhbGx5
IGRpZCB0aGF0OiB0aGUgcmVxdWVzdA0KPiBtYXkgaGF2ZSBiZWVuIHJlLWFsbG9jYXRlZCBhbmQg
aXNzdWVkIGFzIGEgbmV3IGNvbW1hbmQsIGFuZCBjYWxsaW5nDQo+IGJsa19tcV9jb21wbGV0ZV9y
ZXF1ZXN0KCkgdGhlIHNlY29uZCB0aW1lIGludHJvZHVjZXMgZGF0YSBjb3JydXB0aW9uLg0KDQpI
ZWxsbyBLZWl0aCwNCg0KUGxlYXNlIGhhdmUgYW5vdGhlciBsb29rIGF0IHRoZSBjdXJyZW50IGNv
ZGUgdGhhdCBoYW5kbGVzIHJlcXVlc3QgdGltZW91dHMNCmFuZCBjb21wbGV0aW9ucy4gVGhlIGN1
cnJlbnQgaW1wbGVtZW50YXRpb24gZ3VhcmFudGVlcyB0aGF0IG5vIGRvdWJsZQ0KY29tcGxldGlv
bnMgY2FuIG9jY3VyIGJ1dCB5b3VyIHBhdGNoIHJlbW92ZXMgZXNzZW50aWFsIGFzcGVjdHMgb2Yg
dGhhdA0KaW1wbGVtZW50YXRpb24uDQoNClRoYW5rcywNCg0KQmFydC4=

WARNING: multiple messages have this Message-ID (diff)
From: Bart.VanAssche@wdc.com (Bart Van Assche)
Subject: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce
Date: Tue, 22 May 2018 16:29:07 +0000	[thread overview]
Message-ID: <d73bd0b081dbf2156e7b20df4f85e1db38785b0b.camel@wdc.com> (raw)
In-Reply-To: <20180522141507.GQ5528@localhost.localdomain>

On Tue, 2018-05-22@08:15 -0600, Keith Busch wrote:
> This shouldn't be introducing any new concorrent calls to
> __blk_mq_complete_request if they don't already exist. The timeout work
> calls it only if the driver's timeout returns BLK_EH_HANDLED, which means
> the driver is claiming the command is now done, but the driver didn't call
> blk_mq_complete_request as indicated by the request's IN_FLIGHT state.
> 
> In order to get a second call to __blk_mq_complete_request(), then,
> the driver would have to end up calling blk_mq_complete_request()
> in another context. But there's nothing stopping that from happening
> today, and would be bad if any driver actually did that: the request
> may have been re-allocated and issued as a new command, and calling
> blk_mq_complete_request() the second time introduces data corruption.

Hello Keith,

Please have another look at the current code that handles request timeouts
and completions. The current implementation guarantees that no double
completions can occur but your patch removes essential aspects of that
implementation.

Thanks,

Bart.

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

Thread overview: 128+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-21 23:11 [RFC PATCH 0/3] blk-mq: Timeout rework Keith Busch
2018-05-21 23:11 ` Keith Busch
2018-05-21 23:11 ` [RFC PATCH 1/3] blk-mq: Reference count request usage Keith Busch
2018-05-21 23:11   ` Keith Busch
2018-05-22  2:27   ` Ming Lei
2018-05-22  2:27     ` Ming Lei
2018-05-22 15:19   ` Christoph Hellwig
2018-05-22 15:19     ` Christoph Hellwig
2018-05-21 23:11 ` [RFC PATCH 2/3] blk-mq: Fix timeout and state order Keith Busch
2018-05-21 23:11   ` Keith Busch
2018-05-22  2:28   ` Ming Lei
2018-05-22  2:28     ` Ming Lei
2018-05-22 15:24   ` Christoph Hellwig
2018-05-22 15:24     ` Christoph Hellwig
2018-05-22 16:27     ` Bart Van Assche
2018-05-22 16:27       ` Bart Van Assche
2018-05-21 23:11 ` [RFC PATCH 3/3] blk-mq: Remove generation seqeunce Keith Busch
2018-05-21 23:11   ` Keith Busch
2018-05-21 23:29   ` Bart Van Assche
2018-05-21 23:29     ` Bart Van Assche
2018-05-22 14:15     ` Keith Busch
2018-05-22 14:15       ` Keith Busch
2018-05-22 16:29       ` Bart Van Assche [this message]
2018-05-22 16:29         ` Bart Van Assche
2018-05-22 16:34         ` Keith Busch
2018-05-22 16:34           ` Keith Busch
2018-05-22 16:48           ` Bart Van Assche
2018-05-22 16:48             ` Bart Van Assche
2018-05-22  2:49   ` Ming Lei
2018-05-22  2:49     ` Ming Lei
2018-05-22  3:16     ` Jens Axboe
2018-05-22  3:16       ` Jens Axboe
2018-05-22  3:47       ` Ming Lei
2018-05-22  3:47         ` Ming Lei
2018-05-22  3:51         ` Jens Axboe
2018-05-22  3:51           ` Jens Axboe
2018-05-22  8:51           ` Ming Lei
2018-05-22  8:51             ` Ming Lei
2018-05-22 14:35             ` Jens Axboe
2018-05-22 14:35               ` Jens Axboe
2018-05-22 14:20     ` Keith Busch
2018-05-22 14:20       ` Keith Busch
2018-05-22 14:37       ` Ming Lei
2018-05-22 14:37         ` Ming Lei
2018-05-22 14:46         ` Keith Busch
2018-05-22 14:46           ` Keith Busch
2018-05-22 14:57           ` Ming Lei
2018-05-22 14:57             ` Ming Lei
2018-05-22 15:01             ` Keith Busch
2018-05-22 15:01               ` Keith Busch
2018-05-22 15:07               ` Ming Lei
2018-05-22 15:07                 ` Ming Lei
2018-05-22 15:17                 ` Keith Busch
2018-05-22 15:17                   ` Keith Busch
2018-05-22 15:23                   ` Ming Lei
2018-05-22 15:23                     ` Ming Lei
2018-05-22 16:17   ` Christoph Hellwig
2018-05-22 16:17     ` Christoph Hellwig
2018-05-23  0:34     ` Ming Lei
2018-05-23  0:34       ` Ming Lei
2018-05-23 14:35       ` Keith Busch
2018-05-23 14:35         ` Keith Busch
2018-05-24  1:52         ` Ming Lei
2018-05-24  1:52           ` Ming Lei
2018-05-23  5:48     ` Hannes Reinecke
2018-05-23  5:48       ` Hannes Reinecke
2018-07-12 18:16   ` Bart Van Assche
2018-07-12 18:16     ` Bart Van Assche
2018-07-12 19:24     ` Keith Busch
2018-07-12 19:24       ` Keith Busch
2018-07-12 22:24       ` Bart Van Assche
2018-07-12 22:24         ` Bart Van Assche
2018-07-13  1:12         ` jianchao.wang
2018-07-13  1:12           ` jianchao.wang
2018-07-13  2:40         ` jianchao.wang
2018-07-13  2:40           ` jianchao.wang
2018-07-13 15:43         ` Keith Busch
2018-07-13 15:43           ` Keith Busch
2018-07-13 15:52           ` Bart Van Assche
2018-07-13 15:52             ` Bart Van Assche
2018-07-13 18:47             ` Keith Busch
2018-07-13 18:47               ` Keith Busch
2018-07-13 23:03               ` Bart Van Assche
2018-07-13 23:03                 ` Bart Van Assche
2018-07-13 23:58                 ` Keith Busch
2018-07-13 23:58                   ` Keith Busch
2018-07-18 19:56                   ` hch
2018-07-18 19:56                     ` hch
2018-07-18 20:39                     ` hch
2018-07-18 20:39                       ` hch
2018-07-18 21:05                       ` Bart Van Assche
2018-07-18 21:05                         ` Bart Van Assche
2018-07-18 22:53                       ` Keith Busch
2018-07-18 22:53                         ` Keith Busch
2018-07-18 20:53                     ` Keith Busch
2018-07-18 20:53                       ` Keith Busch
2018-07-18 20:58                       ` Bart Van Assche
2018-07-18 20:58                         ` Bart Van Assche
2018-07-18 21:17                         ` Keith Busch
2018-07-18 21:17                           ` Keith Busch
2018-07-18 21:30                           ` Bart Van Assche
2018-07-18 21:30                             ` Bart Van Assche
2018-07-18 21:33                             ` Keith Busch
2018-07-18 21:33                               ` Keith Busch
2018-07-19 13:19                           ` hch
2018-07-19 13:19                             ` hch
2018-07-19 14:59                             ` Keith Busch
2018-07-19 14:59                               ` Keith Busch
2018-07-19 15:56                               ` Keith Busch
2018-07-19 15:56                                 ` Keith Busch
2018-07-19 16:04                                 ` Bart Van Assche
2018-07-19 16:04                                   ` Bart Van Assche
2018-07-19 16:22                                   ` Keith Busch
2018-07-19 16:22                                     ` Keith Busch
2018-07-19 16:29                                     ` hch
2018-07-19 16:29                                       ` hch
2018-07-19 20:18                                       ` Keith Busch
2018-07-19 20:18                                         ` Keith Busch
2018-07-19 13:22                       ` hch
2018-07-19 13:22                         ` hch
2018-05-21 23:29 ` [RFC PATCH 0/3] blk-mq: Timeout rework Bart Van Assche
2018-05-21 23:29   ` Bart Van Assche
2018-05-22 14:06   ` Keith Busch
2018-05-22 14:06     ` Keith Busch
2018-05-22 16:30     ` Bart Van Assche
2018-05-22 16:30       ` Bart Van Assche
2018-05-22 16:44       ` Keith Busch
2018-05-22 16:44         ` Keith Busch

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=d73bd0b081dbf2156e7b20df4f85e1db38785b0b.camel@wdc.com \
    --to=bart.vanassche@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=keith.busch@intel.com \
    --cc=keith.busch@linux.intel.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=ming.lei@redhat.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 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.