Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1949857pxx; Sat, 31 Oct 2020 03:44:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBRxjV3iQ+ektVVz19fsTXNaNPNHOQ5ERGOelK+gFwrnEimC1KcEOtw2bDFixGjdmOStOT X-Received: by 2002:a05:6402:1684:: with SMTP id a4mr6838840edv.79.1604141041906; Sat, 31 Oct 2020 03:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604141041; cv=none; d=google.com; s=arc-20160816; b=zk7l22/vn1FkaOCx2X+zF+RWhsBGNr/TE6nqWxb3DBrKxyAW/CHmPPimCKLeQjD3ia HS8djpcDpa6h+Py7oVeNzfPRP5Mn8Zr1G1G/rskm3wEUFWX9Y+9S0um7ciJyfNkIzcop rNfsiYcRzWGjWx6zkcne7moLrqW3HncQz04iez+K/t/EsA351J1jqPezxvs+7AopXe+9 yt/d6D7i7HwG8A+n+QOUw1V21CXZFwKfXhatC286Yza7kqrKJhyYoErei0a9GUCfNNat kB3Yiw0bu+2vK1cFQanF9hTTdF4Kt9BQtmrXN3y5hCGAcj+MAllECcxvbJ2hKRzG3jbL zE3Q== 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:dkim-signature :dkim-signature:date; bh=xObs7EwbaHNBrpibRpna/d2c5MAikT9OMjntatKbx7Q=; b=zQIJihPtstJra+usgBh2t5QwttQdXj6PhorqwOpn4Dm/6Wjl0xRaBzlk/QWOrTIB8M yk6IXVci/QSU+qRTslNZPHcdRUCynqRgF7g4AOVwxQFDAkzdKcX+zSHKdrxGi10MqVBA /CCPk/aoC7yHTEe6KiFWk0wHR6ZDwV5jU9YFTF1z/hZ5tEiOGs8BZmw8iOx7HCsOjTrY ixBmpeVA8hDtD7DZqOeD1oPHIcfKvnLXz6Ib7cdy1CCgV0DiU/NzWIp4cgnMjn3zZggz yI8W3Sc67ZQP+kn8cGkImBI46sNfBLsJPURrCy5EZDaF8lpIFRAy9xZbYxHIYHHcahu3 In/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=EVjglqXR; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=HeDt+NJW; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p6si6900924edd.206.2020.10.31.03.43.37; Sat, 31 Oct 2020 03:44:01 -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=@linutronix.de header.s=2020 header.b=EVjglqXR; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=HeDt+NJW; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726760AbgJaKlM (ORCPT + 99 others); Sat, 31 Oct 2020 06:41:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726730AbgJaKlL (ORCPT ); Sat, 31 Oct 2020 06:41:11 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6FC3DC0613D5; Sat, 31 Oct 2020 03:41:11 -0700 (PDT) Date: Sat, 31 Oct 2020 11:41:08 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1604140869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xObs7EwbaHNBrpibRpna/d2c5MAikT9OMjntatKbx7Q=; b=EVjglqXRDCtsJn/PocF4fkuRzKOPmWAC3LphY07rJjdyo9NVjN3p6cY7AyYSpvNPMXWTz0 gXNJGYudSzeEylRNyCckodwGupAeQrergKsE85lv58ay7O1ibhP9uInKcs0WppYg1Uamny KsoTG+JH4KaX488LbfW7VNXVEmpLx7Ohij5mfWfL42MG0oKcQdmgbl2LRML2mtvpga8LFt CTCrml5KzKO9DYpkKtnAI+KveFvhASo+RnYs5bfl/jMB7WPJn2ZCKJpuf/D0dFQhKJE9Q9 z6dsvAIq2rhCB7Y2PKkSF/b2g91xXOdPmTmLvsdgf9e34Wp4VjCuSCxlOWZ2Cg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1604140869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xObs7EwbaHNBrpibRpna/d2c5MAikT9OMjntatKbx7Q=; b=HeDt+NJW5y3d8Va4BDSNOYWNbm9DNqXWCddsA9uNtH7jzDJAnuQR3f+tl0WS6ecS39fH26 pawk9B8qcGs+dIAg== From: Sebastian Andrzej Siewior To: Sagi Grimberg Cc: Christoph Hellwig , linux-block@vger.kernel.org, Thomas Gleixner , David Runge , linux-rt-users@vger.kernel.org, Jens Axboe , linux-kernel@vger.kernel.org, Peter Zijlstra , Daniel Wagner , Mike Galbraith Subject: Re: [PATCH 3/3] blk-mq: Use llist_head for blk_cpu_done Message-ID: <20201031104108.wjjdiklqrgyqmj54@linutronix.de> References: <20201028065616.GA24449@infradead.org> <20201028141251.3608598-1-bigeasy@linutronix.de> <20201028141251.3608598-3-bigeasy@linutronix.de> <20201029131212.dsulzvsb6pahahbs@linutronix.de> <20201029140536.GA6376@infradead.org> <20201029145623.3zry7o6nh6ks5tjj@linutronix.de> <20201029145743.GA19379@infradead.org> <20201029210103.ocufuvj6i4idf5hj@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-10-29 14:07:59 [-0700], Sagi Grimberg wrote: > > in which context? > > Not sure what is the question. The question is in which context do you complete your requests. My guess by now is "usually softirq/NAPI and context in rare error case". > > But this is probably nr_hw_queues > 1? > > Yes. So this means it will either complete directly or issue an IPI. > > but running it in softirq on the remote CPU would still allow of other > > packets to come on the remote CPU (which would block BLOCK sofirq if > > NET_RX is already running). > > Not sure I understand your comment, if napi triggers on core X and we > complete from that, it will trigger IPI to core Y, and there with patch #2 > is will trigger softirq instead of calling ->complete directly no? This is correct. But trigger softirq does not mean that it will wake `ksoftirqd' as it is the case for the usb-storage right now. In your case (completing from NAPI/sofitrq (or for most other driver which complete in their IRQ handler)) it means: - trigger IPI - IPI will OR the BLOCK-softirq bit. - on exit from IPI it will invoke do_softirq() (unless softirq is already pending and got interrupted by the IPI) and complete the Block request. Sebastian