Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp3016880img; Mon, 25 Mar 2019 01:54:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLWIY0xRgFe9NnA72JL/8fh+tBzWWjLIx3L38VWd076dAtqcBoJy9xu7ZIg3Nzul13mBVZ X-Received: by 2002:a62:469a:: with SMTP id o26mr23571034pfi.251.1553504069353; Mon, 25 Mar 2019 01:54:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553504069; cv=none; d=google.com; s=arc-20160816; b=QuX668DGktAWsWLQarmV+ZFSMEekdWfwQhhzTX2jEqBErdd6e2kfu6gAKWW6LJ5Qky SgeGiaxvjMtehlSadYLkyAc4w1jVqYaIl8dToM+N1dTV4qKJ+OPsyJj3xKrFlDXIA5zW +HDcn5RidaYRhT2gxhNu0M9N6bkGtvUlT1waoflvRxh9Rh+RXkzcUfEkm2VIweRklBDE mDW0IGdHnvWcDdiv/9CQTcjiCzTK0WVDs4L+bsoUNDzaCiLgO/Ii37M8IFUvUXlKbLMK 02A8mmUuCxIFD1T6ra572DNK+OpupksxNwZa4vBgoX7539xh6GWdpQcTco9wdaFpzBdD RsHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=5g6mB/7wZQYfPo9w9yxAYQtT6FVnV053hYV1EkfMPyI=; b=Dt7rtoJJqpYONCeAZP1Zq9OpdAxo1Qm07kfS7NM3ir8WJMfJR0/F6zhssAxuQkT7aR Dy2HuvcK4yDKhKyA9hqYnsV0LmHQz9fLuBGX2R39b5r78C+M20gkf4gKa2Ylduy8kx2n JMZ+ZnpKezc+oT4HOydpj6O53UZt0VRs483dv1Ix3pci/cRfye1dLwMCHVJYj8MpTupL NzXQNO+5m7YveF4C/pBxt042jOy0Myvz0F4gKgyCGhDj9zdk2qEF1ZjczfXY/X7vC5+J 4iSH6yG/FU8cYcSy03GxaP4gp4F4gVLKMfl1UpFlpPUCW4alyY94S3awhaWpbNoj9Np9 IHVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k66si4776784pgc.247.2019.03.25.01.54.13; Mon, 25 Mar 2019 01:54:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730043AbfCYIxb (ORCPT + 99 others); Mon, 25 Mar 2019 04:53:31 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:45018 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726234AbfCYIxb (ORCPT ); Mon, 25 Mar 2019 04:53:31 -0400 Received: from p5492e2fc.dip0.t-ipconnect.de ([84.146.226.252] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1h8LMG-0005e8-SB; Mon, 25 Mar 2019 09:53:29 +0100 Date: Mon, 25 Mar 2019 09:53:28 +0100 (CET) From: Thomas Gleixner To: Ming Lei cc: Peter Xu , Christoph Hellwig , Jason Wang , Luiz Capitulino , Linux Kernel Mailing List , "Michael S. Tsirkin" , minlei@redhat.com Subject: Re: Virtio-scsi multiqueue irq affinity In-Reply-To: <20190325070616.GA9642@ming.t460p> Message-ID: References: <20190318062150.GC6654@xz-x1> <20190325050213.GH9149@xz-x1> <20190325070616.GA9642@ming.t460p> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ming, On Mon, 25 Mar 2019, Ming Lei wrote: > On Mon, Mar 25, 2019 at 01:02:13PM +0800, Peter Xu wrote: > > One thing I can think of is the real-time scenario where "isolcpus=" > > is provided, then logically we should not allow any isolated CPUs to > > be bound to any of the multi-queue IRQs. Though Ming Lei and I had a > > So far, this behaviour is made by user-space. > > >From my understanding, IRQ subsystem doesn't handle "isolcpus=", even > though the Kconfig help doesn't mention irq affinity affect: > > Make sure that CPUs running critical tasks are not disturbed by > any source of "noise" such as unbound workqueues, timers, kthreads... > Unbound jobs get offloaded to housekeeping CPUs. This is driven by > the "isolcpus=" boot parameter. isolcpus has no effect on the interupts. That's what 'irqaffinity=' is for. > Yeah, some RT application may exclude 'isolcpus=' from some IRQ's > affinity via /proc/irq interface, and now it becomes not possible any > more to do that for managed IRQ. > > > discussion offlist before and Ming explained to me that as long as the > > isolated CPUs do not generate any IO then there will be no IRQ on > > those isolated (real-time) CPUs at all. Can we guarantee that? Now > > It is only guaranteed for 1:1 mapping. > > blk-mq uses managed IRQ's affinity to setup queue mapping, for example: > > 1) single hardware queue > - this queue's IRQ affinity includes all CPUs, then the hardware queue's > IRQ is only fired on one specific CPU for IO submitted from any CPU Right. We can special case that for single HW queue to honor the default affinity setting. That's not hard to achieve. > 2) multi hardware queue > - there are N hardware queues > - for each hardware queue i(i < N), its IRQ's affinity may include N(i) CPUs, > then IRQ for this hardware queue i is fired on one specific CPU among N(i). Correct and that's the sane case where it does not matter much, because if your task on an isolated CPU does I/O then redirecting it through some other CPU does not make sense. If it doesn't do I/O it wont be affected by the dormant queue. Thanks, tglx