lkml.org 
[lkml]   [2015]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/4] blk-mq: establish new mapping before cpu starts handling requests
From
On Wed, Jun 24, 2015 at 10:34 PM, Akinobu Mita <akinobu.mita@gmail.com> wrote:
> Hi Ming,
>
> 2015-06-24 18:46 GMT+09:00 Ming Lei <tom.leiming@gmail.com>:
>> On Sun, Jun 21, 2015 at 9:52 PM, Akinobu Mita <akinobu.mita@gmail.com> wrote:
>>> ctx->index_hw is zero for the CPUs which have never been onlined since
>>> the block queue was initialized. If one of those CPUs is hotadded and
>>> starts handling request before new mappings are established, pending
>>
>> Could you explain a bit what the handling request is? The fact is that
>> blk_mq_queue_reinit() is run after all queues are put into freezing.
>
> Notifier callbacks for CPU_ONLINE action can be run on the other CPU
> than the CPU which was just onlined. So it is possible for the
> process running on the just onlined CPU to insert request and run
> hw queue before blk_mq_queue_reinit_notify() is actually called with
> action=CPU_ONLINE.

You are right because blk_mq_queue_reinit_notify() is alwasy run after
the CPU becomes UP, so there is a tiny window in which the CPU is up
but the mapping is updated. Per current design, the CPU just onlined
is still mapped to hw queue 0 until the mapping is updated by
blk_mq_queue_reinit_notify().

But I am wondering why it is a problem and why you think flush_busy_ctxs
can't find the requests on the software queue in this situation?


--
Ming Lei


\
 
 \ /
  Last update: 2015-06-24 18:41    [W:1.238 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site