From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0ABD3C2BA1A for ; Fri, 24 Apr 2020 10:42:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E4D072071E for ; Fri, 24 Apr 2020 10:42:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726699AbgDXKml (ORCPT ); Fri, 24 Apr 2020 06:42:41 -0400 Received: from verein.lst.de ([213.95.11.211]:34326 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726614AbgDXKml (ORCPT ); Fri, 24 Apr 2020 06:42:41 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 12C4568CEE; Fri, 24 Apr 2020 12:42:39 +0200 (CEST) Date: Fri, 24 Apr 2020 12:42:38 +0200 From: Christoph Hellwig To: Ming Lei Cc: Jens Axboe , linux-block@vger.kernel.org, John Garry , Bart Van Assche , Hannes Reinecke , Christoph Hellwig , Thomas Gleixner Subject: Re: [PATCH V8 09/11] blk-mq: add blk_mq_hctx_handle_dead_cpu for handling cpu dead Message-ID: <20200424104238.GF28156@lst.de> References: <20200424102351.475641-1-ming.lei@redhat.com> <20200424102351.475641-10-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200424102351.475641-10-ming.lei@redhat.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org > +static int blk_mq_hctx_notify_dead(unsigned int cpu, struct hlist_node *node) > +{ > + struct blk_mq_hw_ctx *hctx = hlist_entry_safe(node, > + struct blk_mq_hw_ctx, cpuhp_dead); > + > + if (!cpumask_test_cpu(cpu, hctx->cpumask)) > + return 0; > + > + blk_mq_hctx_handle_dead_cpu(hctx, cpu); > return 0; As commented last time: why not simply: if (cpumask_test_cpu(cpu, hctx->cpumask)) blk_mq_hctx_handle_dead_cpu(hctx, cpu); return 0; ?