[PATCH v7 07/10] isolation: Introduce io_queue isolcpus type

Aaron Tomlin atomlin at atomlin.com
Mon Jul 7 18:26:00 PDT 2025


On Wed, Jul 02, 2025 at 06:33:57PM +0200, Daniel Wagner wrote:
> 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 <hare at suse.de>
> Signed-off-by: Daniel Wagner <wagi at kernel.org>
> ---
>  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 93b038d48900a304a29ecc0c8aa8b7d419ea1397..c8cb0cf2b15a11524be73826f38bb2a0709c449c 100644
> --- a/kernel/sched/isolation.c
> +++ b/kernel/sched/isolation.c
> @@ -11,6 +11,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),
>  };
>  
> @@ -224,6 +225,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.50.0
> 

Reviewed-by: Aaron Tomlin <atomlin at atomlin.com>

-- 
Aaron Tomlin



More information about the Linux-nvme mailing list