[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210721142726.GA206211@e120877-lin.cambridge.arm.com>
Date: Wed, 21 Jul 2021 15:28:45 +0100
From: Vincent Donnefort <vincent.donnefort@....com>
To: Frederic Weisbecker <frederic@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Tejun Heo <tj@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Alex Belits <abelits@...vell.com>,
Nitesh Lal <nilal@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Nicolas Saenz <nsaenzju@...hat.com>,
Christoph Lameter <cl@...two.de>,
Marcelo Tosatti <mtosatti@...hat.com>,
Zefan Li <lizefan.x@...edance.com>, cgroups@...r.kernel.org
Subject: Re: [RFC PATCH 5/6] sched/isolation: Make HK_FLAG_DOMAIN mutable
Hi Frederic,
[...]
>
> +// Only support HK_FLAG_DOMAIN for now
> +// TODO: propagate the changes through all interested subsystems:
> +// workqueues, net, pci; ...
> +void housekeeping_cpumask_set(struct cpumask *mask, enum hk_flags flags)
> +{
> + /* Only HK_FLAG_DOMAIN change supported for now */
> + if (WARN_ON_ONCE(flags != HK_FLAG_DOMAIN))
> + return;
>
> + if (!static_key_enabled(&housekeeping_overridden.key)) {
> + if (cpumask_equal(mask, cpu_possible_mask))
> + return;
> + if (WARN_ON_ONCE(!alloc_cpumask_var(&hk_domain_mask, GFP_KERNEL)))
> + return;
> + cpumask_copy(hk_domain_mask, mask);
> + static_branch_enable(&housekeeping_overridden);
I get a warning here. static_branch_enable() is trying to take cpus_read_lock().
But the same lock is already taken by cpuset_write_u64().
Also, shouldn't it set HK_FLAG_DOMAIN in housekeeping_flags to enable
housekeeping if the kernel started without isolcpus="" ?
--
Vincent
Powered by blists - more mailing lists