Commit 4fca0e55 authored by Frederic Weisbecker's avatar Frederic Weisbecker
Browse files

sched/isolation: Save boot defined domain flags



HK_TYPE_DOMAIN will soon integrate not only boot defined isolcpus= CPUs
but also cpuset isolated partitions.

Housekeeping still needs a way to record what was initially passed
to isolcpus= in order to keep these CPUs isolated after a cpuset
isolated partition is modified or destroyed while containing some of
them.

Create a new HK_TYPE_DOMAIN_BOOT to keep track of those.

Signed-off-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Reviewed-by: default avatarPhil Auld <pauld@redhat.com>
Reviewed-by: default avatarWaiman Long <longman@redhat.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Marco Crivellari <marco.crivellari@suse.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Waiman Long <longman@redhat.com>
parent 69e227e4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -7,8 +7,12 @@
#include <linux/tick.h>

enum hk_type {
	/* Inverse of boot-time isolcpus= argument */
	HK_TYPE_DOMAIN_BOOT,
	HK_TYPE_DOMAIN,
	/* Inverse of boot-time isolcpus=managed_irq argument */
	HK_TYPE_MANAGED_IRQ,
	/* Inverse of boot-time nohz_full= or isolcpus=nohz arguments */
	HK_TYPE_KERNEL_NOISE,
	HK_TYPE_MAX,

+3 −2
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include "sched.h"

enum hk_flags {
	HK_FLAG_DOMAIN_BOOT	= BIT(HK_TYPE_DOMAIN_BOOT),
	HK_FLAG_DOMAIN		= BIT(HK_TYPE_DOMAIN),
	HK_FLAG_MANAGED_IRQ	= BIT(HK_TYPE_MANAGED_IRQ),
	HK_FLAG_KERNEL_NOISE	= BIT(HK_TYPE_KERNEL_NOISE),
@@ -239,7 +240,7 @@ static int __init housekeeping_isolcpus_setup(char *str)

		if (!strncmp(str, "domain,", 7)) {
			str += 7;
			flags |= HK_FLAG_DOMAIN;
			flags |= HK_FLAG_DOMAIN | HK_FLAG_DOMAIN_BOOT;
			continue;
		}

@@ -269,7 +270,7 @@ static int __init housekeeping_isolcpus_setup(char *str)

	/* Default behaviour for isolcpus without flags */
	if (!flags)
		flags |= HK_FLAG_DOMAIN;
		flags |= HK_FLAG_DOMAIN | HK_FLAG_DOMAIN_BOOT;

	return housekeeping_setup(str, flags);
}