From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F9223161CA; Fri, 5 Sep 2025 15:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757084420; cv=none; b=TzpcLgClrKz5DM2+Hf3IOhU3O8GrG3LQ3sSjx+f1X+sIjmsY3tEmVpwpg8ywI00RkUToGuCVX+DuFTz7ht3uddoO5zYchLQUT6nO4qvvFy2094PUYLnMeRdaqdNULilUSgFfcEdts2S3zEXXXNGlHDFCmQ8J/paFbARCMriDeVs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757084420; c=relaxed/simple; bh=pc6iub2dM5eyhL1IbJjUrs6bKEmJkAHyhaCXOIW6zSQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HX1OpNiZz6WwT4dGJsiOUQQVa13lsFP70Fm20/KMEwOjAgZhSBAyFcVeFJ8/Pys59e7D7i1jMipp/403KcRb/sct0NToqRJ6GMc5o5n4sV1UT+aGxolE7i8UCR/luqFBVJ4vCwTpzUGIx8pZHbyvFaQSdTx3U9DCZ3Xgpmt7mK8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=U8yGZePu; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="U8yGZePu" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 42C7EC4CEF1; Fri, 5 Sep 2025 15:00:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757084417; bh=pc6iub2dM5eyhL1IbJjUrs6bKEmJkAHyhaCXOIW6zSQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=U8yGZePuCOlHZWyjcW9pJUKXkSKc46BqKDWkHcoKYAE7KyfNfsoJagW09ju6Pi+EA /buJAb88JGJn/6fraOEP0TwkssIAmaLXBg1FvE8zTKnevUWPCVVjGKB85MjXTqf8hT TLkpztD3Soeqn67ssNkXhzFTnyKN15YsL6yrs3NgsmD5HQIUFZ08HBp32y2A+SwXPu mdWQFKzMERHyknevKpTyLQjZkqoOW9AYP/EbG6cp/U+zjEFpKsGkg98ot3+wgvQp72 LR+TLzSxggFx02Z4q+6st+t8O7VQ9UW2EGAqt0yQmQz6Oq8ThESmSMbM+XUiFHQFLq 12nRhDXGFoYcg== From: Daniel Wagner Date: Fri, 05 Sep 2025 16:59:55 +0200 Subject: [PATCH v8 09/12] isolation: Introduce io_queue isolcpus type Precedence: bulk X-Mailing-List: virtualization@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250905-isolcpus-io-queues-v8-9-885984c5daca@kernel.org> References: <20250905-isolcpus-io-queues-v8-0-885984c5daca@kernel.org> In-Reply-To: <20250905-isolcpus-io-queues-v8-0-885984c5daca@kernel.org> To: Jens Axboe , Keith Busch , Christoph Hellwig , Sagi Grimberg , "Michael S. Tsirkin" Cc: Aaron Tomlin , "Martin K. Petersen" , Thomas Gleixner , Costa Shulyupin , Juri Lelli , Valentin Schneider , Waiman Long , Ming Lei , Frederic Weisbecker , Mel Gorman , Hannes Reinecke , Mathieu Desnoyers , Aaron Tomlin , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-nvme@lists.infradead.org, megaraidlinux.pdl@broadcom.com, linux-scsi@vger.kernel.org, storagedev@microchip.com, virtualization@lists.linux.dev, GR-QLogic-Storage-Upstream@marvell.com, Daniel Wagner X-Mailer: b4 0.14.2 Multiqueue drivers spread I/O queues across all CPUs for optimal performance. However, these drivers are not aware of CPU isolation requirements and will distribute queues without considering the isolcpus configuration. Introduce a new isolcpus mask that allows users to define which CPUs should have I/O queues assigned. This is similar to managed_irq, but intended for drivers that do not use the managed IRQ infrastructure Reviewed-by: Hannes Reinecke Reviewed-by: Aaron Tomlin Signed-off-by: Daniel Wagner --- include/linux/sched/isolation.h | 1 + kernel/sched/isolation.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h index d8501f4709b583b8a1c91574446382f093bccdb1..6b6ae9c5b2f61a93c649a98ea27482b932627fca 100644 --- a/include/linux/sched/isolation.h +++ b/include/linux/sched/isolation.h @@ -9,6 +9,7 @@ enum hk_type { HK_TYPE_DOMAIN, HK_TYPE_MANAGED_IRQ, + HK_TYPE_IO_QUEUE, HK_TYPE_KERNEL_NOISE, HK_TYPE_MAX, diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c index a4cf17b1fab062f536c7f4f47c35f0e209fd25d6..0d59cc95bf3b8fa2f06cb562ce1baf3fdd48c9db 100644 --- a/kernel/sched/isolation.c +++ b/kernel/sched/isolation.c @@ -13,6 +13,7 @@ enum hk_flags { HK_FLAG_DOMAIN = BIT(HK_TYPE_DOMAIN), HK_FLAG_MANAGED_IRQ = BIT(HK_TYPE_MANAGED_IRQ), + HK_FLAG_IO_QUEUE = BIT(HK_TYPE_IO_QUEUE), HK_FLAG_KERNEL_NOISE = BIT(HK_TYPE_KERNEL_NOISE), }; @@ -226,6 +227,12 @@ static int __init housekeeping_isolcpus_setup(char *str) continue; } + if (!strncmp(str, "io_queue,", 9)) { + str += 9; + flags |= HK_FLAG_IO_QUEUE; + continue; + } + /* * Skip unknown sub-parameter and validate that it is not * containing an invalid character. -- 2.51.0