Re: [PATCH v2 2/4] block: add a read barrier in blk_queue_enter()

2017-03-27 Thread Ming Lei
On Sat, Mar 25, 2017 at 2:45 AM, Bart Van Assche wrote: > On Sat, 2017-03-25 at 01:38 +0800, Ming Lei wrote: >> As I explained, the dying flag should only be mentioned after we change >> the code in blk_set_queue_dying(). > > Hello Ming, > > If patches 2 and 4 would be

Re: [PATCH v2 2/4] block: add a read barrier in blk_queue_enter()

2017-03-24 Thread Bart Van Assche
On Sat, 2017-03-25 at 01:38 +0800, Ming Lei wrote: > As I explained, the dying flag should only be mentioned after we change > the code in blk_set_queue_dying(). Hello Ming, If patches 2 and 4 would be combined into a single patch then it wouldn't be necessary anymore to update the comment

Re: [PATCH v2 2/4] block: add a read barrier in blk_queue_enter()

2017-03-24 Thread Ming Lei
On Sat, Mar 25, 2017 at 1:24 AM, Bart Van Assche wrote: > On Fri, 2017-03-24 at 20:36 +0800, Ming Lei wrote: >> Without the barrier, reading DEAD flag of .q_usage_counter >> and reading .mq_freeze_depth may be reordered, then the >> following wait_event_interruptible()

Re: [PATCH v2 2/4] block: add a read barrier in blk_queue_enter()

2017-03-24 Thread Bart Van Assche
On Fri, 2017-03-24 at 20:36 +0800, Ming Lei wrote: > Without the barrier, reading DEAD flag of .q_usage_counter > and reading .mq_freeze_depth may be reordered, then the > following wait_event_interruptible() may never return. > > Signed-off-by: Ming Lei > --- >

Re: [PATCH v2 2/4] block: add a read barrier in blk_queue_enter()

2017-03-24 Thread Hannes Reinecke
On 03/24/2017 01:36 PM, Ming Lei wrote: > Without the barrier, reading DEAD flag of .q_usage_counter > and reading .mq_freeze_depth may be reordered, then the > following wait_event_interruptible() may never return. > > Signed-off-by: Ming Lei > --- > block/blk-core.c | 8

[PATCH v2 2/4] block: add a read barrier in blk_queue_enter()

2017-03-24 Thread Ming Lei
Without the barrier, reading DEAD flag of .q_usage_counter and reading .mq_freeze_depth may be reordered, then the following wait_event_interruptible() may never return. Signed-off-by: Ming Lei --- block/blk-core.c | 8 1 file changed, 8 insertions(+) diff --git