[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181026083303.GX3109@worktop.c.hoisthospitality.com>
Date: Fri, 26 Oct 2018 10:33:03 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Mel Gorman <mgorman@...hsingularity.net>,
Rik van Riel <riel@...riel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Wang <wang.yi59@....com.cn>, zhong.weidong@....com.cn,
Yi Liu <liu.yi24@....com.cn>,
Frederic Weisbecker <frederic@...nel.org>
Subject: Re: [PATCH v3 2/3] sched/core: Don't mix isolcpus and housekeeping
CPUs
On Fri, Oct 26, 2018 at 12:12:22AM +0530, Srikar Dronamraju wrote:
> diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> index 3064e0f..37e62b8 100644
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -1003,7 +1003,19 @@ static int migration_cpu_stop(void *data)
> */
> void set_cpus_allowed_common(struct task_struct *p, const struct cpumask *new_mask)
> {
> - cpumask_copy(&p->cpus_allowed, new_mask);
> + const struct cpumask *hk_mask = housekeeping_cpumask(HK_FLAG_DOMAIN);
> +
> + /*
> + * If the cpumask provided has CPUs that are part of isolated and
> + * housekeeping_cpumask, then restrict it to just the CPUs that
> + * are part of the housekeeping_cpumask.
> + */
> + if (!cpumask_subset(new_mask, hk_mask) &&
> + cpumask_intersects(new_mask, hk_mask))
> + cpumask_and(&p->cpus_allowed, new_mask, hk_mask);
> + else
> + cpumask_copy(&p->cpus_allowed, new_mask);
> +
> p->nr_cpus_allowed = cpumask_weight(new_mask);
NAK, I already explained that.
Powered by blists - more mailing lists