Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp870989pxj; Sat, 8 May 2021 00:55:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJywVGL5GkZVyV7uay60S3WgW+c9vHbST0+isZbSrVVhS+nLGqFsa/+sEG39qOFrQM2ebg3v X-Received: by 2002:a17:90a:ad84:: with SMTP id s4mr28595242pjq.162.1620460549110; Sat, 08 May 2021 00:55:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620460549; cv=none; d=google.com; s=arc-20160816; b=B9NpLT3WAR6JabBXZJL1YfV0lDO768VTMjDpWxV1/7D+vtY/cILtESBzaBUmrs6cBj zpRzsgvyrO/eP8azg+SQibTLrsXga+qJCBynLLW1UoaV3loB7szOMcpbWrmlY5AOZlpm ZCWh6VRHZTqf50GY/fy7ffmEtLYAejKq4pvzLzltFEm5K0AmdrUwaIvPM0Ph90Unqtkk +d2gA+YseAceYe0MqDuA7wrgueEfUZW7hh1BHFWG8KFheNalwd8Nac5M/+xqjG8AFQij EeaT05W8y5+zzESfUNoL6qQuaDkVNXruvyFPs7Y6qXKS9kaZOGYt2J+PX36z2DoiMMuU dT+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=h/850DHIe8AiitToOUzWPn1zbmfnmDJVOTYku04eCdY=; b=WyW3aSfezC/+or4/WGb3NwT2P9V8QSx3ObaF6iTWcsyNj9FzLynVfzQJtqy/OTKibL FtSSlzxbhLJEBIDFcJQ8Ooz3QKx/gOElCQy6DVhCmuHJHGuBVB1We3AgWFV2/0d3cd2A lpQLxDmUUkV04zOz8BvP0B9Ic+4+TSQwe9jc7io0kZZQJylVQ7vuS9fMCIQZcOPtCpEu sAuNF8AkMuS5cUICXRpd8tPwttlLhq+1a6Qz0WsKTw8NiZdiItGE3grYiTSK1JH2Vo9Q ojpDMNiYsSHjY3Xq4/zvrEY9XcJv7uPDbxZNEe+ST7R9BcusUxys7SijJBQNF7+ni0bQ w37A== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r27si3266524pfl.141.2021.05.08.00.55.37; Sat, 08 May 2021 00:55:49 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230151AbhEHHxh (ORCPT + 99 others); Sat, 8 May 2021 03:53:37 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:17159 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229726AbhEHHxh (ORCPT ); Sat, 8 May 2021 03:53:37 -0400 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4FcfbJ3r6jzncJJ; Sat, 8 May 2021 15:49:16 +0800 (CST) Received: from [10.67.110.238] (10.67.110.238) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.498.0; Sat, 8 May 2021 15:52:25 +0800 Subject: Re: Virtio-scsi multiqueue irq affinity To: Ming Lei , Thomas Gleixner CC: Peter Xu , Christoph Hellwig , Jason Wang , Luiz Capitulino , "Linux Kernel Mailing List" , "Michael S. Tsirkin" , , References: <20190318062150.GC6654@xz-x1> <20190325050213.GH9149@xz-x1> <20190325070616.GA9642@ming.t460p> <20190325095011.GA23225@ming.t460p> From: xuyihang Message-ID: <0f6c8a5f-ad33-1199-f313-53fe9187a672@huawei.com> Date: Sat, 8 May 2021 15:52:26 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20190325095011.GA23225@ming.t460p> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.110.238] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2019/3/25 17:50, Ming Lei ะด??: > On Mon, Mar 25, 2019 at 09:53:28AM +0100, Thomas Gleixner wrote: >> 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. > Indeed. > > irq_default_affinity is built from 'irqaffinity=', however, we don't > consider irq_default_affinity for managed IRQ affinity. > > Looks Peter wants to exclude some CPUs from the spread on managed IRQ. Hi Ming and Thomas, We are dealing with a scenario which may need to assign a default irqaffinity for managed IRQ. Assume we have a full CPU usage RT thread running binded to a specific CPU. In the mean while, interrupt handler registered by a device which is ksoftirqd may never have a chance to run. (And we don't want to use isolate CPU) There could be a couple way to deal with this problem: 1. Adjust priority of ksoftirqd or RT thread, so the interrupt handler could preempt RT thread. However, I am not sure whether it could have some side effects or not. 2. Adjust interrupt CPU affinity or RT thread affinity. But managed IRQ seems design to forbid user from manipulating interrupt affinity. It seems managed IRQ is coupled with user side application to me. Would you share your thoughts about this issue please? Thanks, Yihang