Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754097AbdHUOtD (ORCPT ); Mon, 21 Aug 2017 10:49:03 -0400 Received: from mail-qk0-f182.google.com ([209.85.220.182]:38676 "EHLO mail-qk0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754084AbdHUOtA (ORCPT ); Mon, 21 Aug 2017 10:49:00 -0400 Date: Mon, 21 Aug 2017 07:48:56 -0700 From: Tejun Heo To: Laurent Vivier Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Jens Axboe , Lai Jiangshan , Michael Ellerman , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 2/2] blk-mq: don't use WORK_CPU_UNBOUND Message-ID: <20170821144855.GF491396@devbig577.frc2.facebook.com> References: <20170821134951.18848-1-lvivier@redhat.com> <20170821134951.18848-2-lvivier@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170821134951.18848-2-lvivier@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 713 Lines: 20 On Mon, Aug 21, 2017 at 03:49:51PM +0200, Laurent Vivier wrote: > cpumask is the list of CPUs present when the queue is built. > If a new CPU is hotplugged, this list is not updated, > and when the scheduler asks for a CPU id, blk_mq_hctx_next_cpu() > can return WORK_CPU_UNBOUND. > And in this case _blk_mq_run_hw_queue() can be executed by the new CPU > (that is not present in cpumask) and raises the following warning: > > WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask) && > cpu_online(hctx->next_cpu)); > > To fix this problem, this patch modifies blk_mq_hctx_next_cpu() > to only return a CPU id present in cpumask. So, this one isn't needed either. Thanks. -- tejun