lkml.org 
[lkml]   [2017]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v1 3/3] blk-mq: start to freeze queue just after setting dying
Date
On Sat, 2017-03-18 at 02:32 +0800, Ming Lei wrote:
> On Sat, Mar 18, 2017 at 1:32 AM, Bart Van Assche wrote:
> > + /*
> > + * Avoid that the updates of the queue flags and q_usage_counter
> > + * are reordered.
> > + */
> > + smp_wmb();
>
> atomic_inc_return() in blk_mq_freeze_queue_start() does imply a
> barrier(smp_mb()).

Hello Ming,

It's probably a good idea to mention that in a comment. The implementation
of blk_mq_freeze_queue_start() namely could be changed in the future such
that it uses another atomic operation that doesn't implicitly perform smp_mb().

Thanks,

Bart.
\
 
 \ /
  Last update: 2017-03-17 21:40    [W:0.046 / U:1.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site