Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp614243pxb; Wed, 27 Jan 2021 16:50:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVDdxDnsj2WupP7k0kbrIw1QnDwnAmIvbzOg3JLacWKlEEpnsgD5iustxZFXKtRW6J9IVM X-Received: by 2002:a05:6402:430c:: with SMTP id m12mr11989682edc.299.1611795007272; Wed, 27 Jan 2021 16:50:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611795007; cv=none; d=google.com; s=arc-20160816; b=FTZQRwuMm3Xik60vDm4xqtFQQnpfPLzCYf7LcgMJ51uXP2eDUd0cpiD9iyA4q57GHT kCq3+4pLvsm1jzQdZECBfK1vEcjO8trbFlbMu0g05aJ/9hEBD3qoZbgySDXDMvRqexHA 3tiTEwHO7GndPOsAZh4y5RYuAMBmzfrLiZf9ikhdJuJ8l3uepjHsqdXhDOBC1mOEEm4r NEyU0X3S3M3CDKfBTH8rzGB4LI08zLfiPD6tcdXCaVyDrAVi59gh2Hb52fTu6VMYE0/C 6lMRM3N32ka8H6NGScaOz/x8F5MQvDiVLiEWlIhKkRA4YPyjBqJNuaKV0I/mb2u2V/iE /fkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=+8wQs09UxnIAmjkNJYFTvqoZyZzqz9vFMoRAGLU2pUY=; b=Dn7arRfXAUqmVfxikctNMwdf0KNgkpNJiPLm6XHavslV06lEuabSN8vL5JGWJ2LcE4 zE//0G4PhYiK6eMFeRyc/9OJTjMESwVvChSfT3GjwNmKcQimC7Yp4oJFr2j+HA17Spou 6o2uBeqrnZ1u0njH86B0J+KbJXND8Xt+zy2WxPmUXtS0Jug13ITgx8Hx4st1lkm83QZP XBOWlWpMxgGB6nx8gSNGk41K31UuOLXtOfpQZem/TlX36PadtQetc1fQedYnW48Wg+JH kJj1oqH9l/y6hEOv/qZSj++P4BQi9e6fAO6Nid1Dje2f/R9d1iaf19hzRU2+adP2ySdf y6Jg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=PrDorPv8; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=k+8j1nMw; 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=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 s16si1577693ejf.641.2021.01.27.16.49.43; Wed, 27 Jan 2021 16:50:07 -0800 (PST) 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=fail header.i=@linutronix.de header.s=2020 header.b=PrDorPv8; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=k+8j1nMw; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229747AbhA1AHN (ORCPT + 99 others); Wed, 27 Jan 2021 19:07:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231217AbhA1AHF (ORCPT ); Wed, 27 Jan 2021 19:07:05 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51920C06174A for ; Wed, 27 Jan 2021 16:06:22 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1611792380; 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=+8wQs09UxnIAmjkNJYFTvqoZyZzqz9vFMoRAGLU2pUY=; b=PrDorPv8xSDZ+KmnFtt1+Tr8fBbhrZ/zimEIAbpJNu5wcdidAnLI13JUSBLb5NUUQQ8nWn cetHbjKqkCYXTBvUmN0Q8pcZocP27C7BUik9pHfuUFWQVZ7OzutB32W9qeXFsVmHwvH5qJ QDjP/FT3FYhqaoPrz2n9g/LD/beeuknktw04JUsXZ0fCp5u752U1EQahYBZjUkUSSoTzsh cvhyXu14YFdZL7zBvrEnAi/1bq5qQLp2eEn6EM8lUcdR7UlIDh/vAo8xmNG9aLdyAWsL9d 1pJpQXd9Q+GU5cXGMA7iod+HVbVJ7n3ESqxwS3S1iv+GK5N+y5mMcLSK40Edcg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1611792380; 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=+8wQs09UxnIAmjkNJYFTvqoZyZzqz9vFMoRAGLU2pUY=; b=k+8j1nMwbBXmLiWcxrgrgtHJ9XwN26Un8X7D+ib+Pl63S6R8/o5n25cwjQaphJSCSjtcSJ NRz9wP4M2jMICcAg== To: Liu Chao , linux-kernel@vger.kernel.org Cc: hushiyuan@huawei.com, hewenliang4@huawei.com, Ming Lei , Marc Zyngier Subject: Re: [PATCH] genirq: Limit irq_calc_affinity_vectors to housekeeping CPUs In-Reply-To: <20210122084746.3407372-1-liuchao173@huawei.com> References: <20210122084746.3407372-1-liuchao173@huawei.com> Date: Thu, 28 Jan 2021 01:06:20 +0100 Message-ID: <87ft2mdiwz.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Liu, On Fri, Jan 22 2021 at 08:47, Liu Chao wrote: > Replace the cpumask used in irq_calc_affinity_vectors from all possible > CPUs to only housekeeping CPUs. > > When we have isolated CPUs used by real-time tasks, IRQs will be move to > housekeeping CPUs. No. > If there are too many IRQ vectors, moving the all to housekeeping CPUs may > exceed per-CPU vector limits. For example, when I only have two > housekeeping CPUs, there are dozens of IRQs on two CPUs, but actually one > IRQ per housekeeping CPU is enough. This does not make any sense. Assumed a system has 256 possible CPUs and the device allows 256 queues then each possible CPU will have ONE queue and ONE associated interrupt. Nothing will change the affinity of any of those interrupts ever. The only way how the housekeeping mask interacts with multiqueue affinities is when there are less queues and therefore less interrupts than CPUs which means that one queue and it's interrupt is associated to multiple CPUs. So the resulting affinity mask might spawn housekeeping and isolated CPUs. When the affinity is set up for the interrupt in hardware then the selection logic which choses a target CPU based on the interrupt affinity mask will prefer the housekeeping CPUs and avoid the isolated ones. But that does not cause vector exhaustion except you have more devices than vectors. So for a single multiqueue device a housekeeping CPU will not have more than one managed queue interrupt ever. I'm not understanding which problem are you trying to solve. Thanks, tglx