Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp55911pxx; Wed, 28 Oct 2020 18:01:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY8Xb4kjUtIKTR5VhSSPOzvGJXXY+XqSS3+sZvhHNnCJN1u2zHj9LjO1uTXyeRyoc5M8rd X-Received: by 2002:a17:906:5f96:: with SMTP id a22mr1747538eju.168.1603933292144; Wed, 28 Oct 2020 18:01:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603933292; cv=none; d=google.com; s=arc-20160816; b=g7xPFCDg+5S+udkmC0G7KxQRo7ocidOTdxFHyZLLC/MaZXn9+FTenJTJTBik6oPg1G ITOAhcCdL8aEfMDSjZGGeeRdzMFg27hAlTfvfLx19ixZnUEAZ8XY2779+4CdG9YmgPm0 u8PdVlCurRLmsbtkQMX4aXRr4uaAC4A1CD5W+60p5gWP2+K/TgojMqqRMZdtJ/fr094h ee3st9dtSWdx++igfLNsx1kOoKhacbMRTMWCvdSq4ONhOgwBOiRNc37g6YwcKUEO//VP 4RSkDvCa5cyQD3E7W6D+7bKMgj9IO4NSOIaCHGI4R3u77rTjTQgtsZTAVJVwGuRH/eXz Xb9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=pbW1tCuoCb5OoMHKLe/zo1YdTNTlOPVa8AEEc+GMK0Y=; b=WJilzqzWozYvJUC5zZPAZjHYDdbutg41j1Oi2d19mQjZnFKYEQbvIjcXqQg2eCfqUM Xmg2duHvSibEzBzZRl4sMKfMbcl1HK6Mi0WNyGasorVyaSNph2P80xMRGDUpo5izbdVp dU+BWxAxMHHFbr7KSuoo7WpQUCxVZvZn7aH2ox6BZjY9en0IHQXGpfT7yPb9DcTKmR1X x2D3bDob9aTFoWq2ZfSSboQ9N0QImUXGDnsE2LdBDuMq+h3xNhd2Ncz9QSsSbdj9pGgm 5ckYTZRnLVAaF5ai0yX6WpYbCiahgpCK9NqzZu6OioJJv+uy9uyUv5JfPV4NjkiAWhNB GXuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=hmnOVDO2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h12si716259ejg.216.2020.10.28.18.01.10; Wed, 28 Oct 2020 18:01:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=hmnOVDO2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730702AbgJ1WLs (ORCPT + 99 others); Wed, 28 Oct 2020 18:11:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730725AbgJ1WLq (ORCPT ); Wed, 28 Oct 2020 18:11:46 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8465C0613CF for ; Wed, 28 Oct 2020 15:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=pbW1tCuoCb5OoMHKLe/zo1YdTNTlOPVa8AEEc+GMK0Y=; b=hmnOVDO2mdOUeHyF8dFmOqABl7 IXFwxMOZo6teAYlA1iNNnFgmC0MWOlUVzDGhdcFFMBqwluvZzjo+88drh7c/WUtjjzOtgaS615aOR /BHOoqPXDwWPBkaFkPHuTDUwzExGsptpZiDp2vRREC2z8P7c3zBDl0Fw7h1VpmdhdycUk0NMmEqe3 0nff9M143urlCeeFNHU2ERF5NazR6z2vFFYcSpsxCCi4lhwJkZWNema1wQAEJsA+83rNH1a/1KSZI LXl3MSdcHO4dW0kMOAvYlgjSQ7kcW9ghP0tE7MmnY0EDcJ7fEyaYRzHaKYaTQhw5q0hJj51EKgd1P fVD2YZrg==; Received: from hch by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kXmh3-0004yC-Ds; Wed, 28 Oct 2020 14:44:53 +0000 Date: Wed, 28 Oct 2020 14:44:53 +0000 From: Christoph Hellwig To: Sebastian Andrzej Siewior Cc: linux-block@vger.kernel.org, Christoph Hellwig , Thomas Gleixner , David Runge , linux-rt-users@vger.kernel.org, Jens Axboe , linux-kernel@vger.kernel.org, Peter Zijlstra , Daniel Wagner Subject: Re: [PATCH 3/3] blk-mq: Use llist_head for blk_cpu_done Message-ID: <20201028144453.GA18610@infradead.org> References: <20201028065616.GA24449@infradead.org> <20201028141251.3608598-1-bigeasy@linutronix.de> <20201028141251.3608598-3-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201028141251.3608598-3-bigeasy@linutronix.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 28, 2020 at 03:12:51PM +0100, Sebastian Andrzej Siewior wrote: > static int blk_softirq_cpu_dead(unsigned int cpu) > { > - /* > - * If a CPU goes away, splice its entries to the current CPU > - * and trigger a run of the softirq > - */ > - local_irq_disable(); > - list_splice_init(&per_cpu(blk_cpu_done, cpu), > - this_cpu_ptr(&blk_cpu_done)); > - raise_softirq_irqoff(BLOCK_SOFTIRQ); > - local_irq_enable(); > - > + blk_complete_reqs(&per_cpu(blk_cpu_done, cpu)); > return 0; How can this be preempted? Can't we keep using this_cpu_ptr here?