mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gabriele Monaco <gmonaco@redhat.com>
To: Waiman Long <llong@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Anna-Maria Behnsen <anna-maria@linutronix.de>,
	 Frederic Weisbecker	 <frederic@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v9 7/8] cgroup/cpuset: Fail if isolated and nohz_full don't leave any housekeeping
Date: Fri, 01 Aug 2025 18:03:08 +0200	[thread overview]
Message-ID: <b2788740ecc02ae70706506468bb71a1e23180cc.camel@redhat.com> (raw)
In-Reply-To: <bdbc1a11-1546-47e6-bb14-d3ad940907ed@redhat.com>

On Thu, 2025-07-31 at 11:39 -0400, Waiman Long wrote:
> 
> On 7/30/25 9:11 AM, Gabriele Monaco wrote:
> > +static bool isolcpus_nohz_conflict(struct cpumask *new_cpus)
> > +{
> > +	cpumask_var_t full_hk_cpus;
> > +	int res = false;
> > +
> > +	if (!housekeeping_enabled(HK_TYPE_KERNEL_NOISE))
> > +		return false;
> > +
> > +	if (!alloc_cpumask_var(&full_hk_cpus, GFP_KERNEL))
> > +		return true;
> > +
> > +	cpumask_and(full_hk_cpus,
> > housekeeping_cpumask(HK_TYPE_KERNEL_NOISE),
> > +		    housekeeping_cpumask(HK_TYPE_DOMAIN));
> > +	cpumask_and(full_hk_cpus, full_hk_cpus, cpu_online_mask);
> > +	if (!cpumask_weight_andnot(full_hk_cpus, new_cpus))
> > +		res = true;
> > +
> > +	free_cpumask_var(full_hk_cpus);
> > +	return res;
> > +}
> 
> First of all, isolated_cpus currently include those CPUs excluded
> from boot time isolcpus=domain setting, but it also include new
> isolated
> cpus created by used by cpuset isolated partitions. Your current 
> isolcpus_nohz_conflicts() does not check isolated_cpus which I think
> is incomplete.

Right, good point! Thanks for the review.
Somehow it was working fine with cpuset+isolcpus, but doesn't work if I
have multiple cpusets.

Thanks,
Gabriele


  reply	other threads:[~2025-08-01 16:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-30 13:11 [PATCH v9 0/8] timers: Exclude isolated cpus from timer migration Gabriele Monaco
2025-07-30 13:11 ` [PATCH v9 1/8] timers/migration: Postpone online/offline callbacks registration to late initcall Gabriele Monaco
2025-07-30 13:11 ` [PATCH v9 2/8] timers: Rename tmigr 'online' bit to 'available' Gabriele Monaco
2025-07-30 13:11 ` [PATCH v9 3/8] timers: Add the available mask in timer migration Gabriele Monaco
2025-07-30 13:11 ` [PATCH v9 4/8] timers: Use scoped_guard when setting/clearing the tmigr available flag Gabriele Monaco
2025-07-30 13:11 ` [PATCH v9 5/8] cgroup/cpuset: Rename update_unbound_workqueue_cpumask() to update_exclusion_cpumasks() Gabriele Monaco
2025-07-31 14:42   ` Waiman Long
2025-07-30 13:11 ` [PATCH v9 6/8] sched/isolation: Force housekeeping if isolcpus and nohz_full don't leave any Gabriele Monaco
2025-07-31 15:09   ` Waiman Long
2025-08-01 14:46     ` Gabriele Monaco
2025-08-01 18:04       ` Waiman Long
2025-07-30 13:11 ` [PATCH v9 7/8] cgroup/cpuset: Fail if isolated and nohz_full don't leave any housekeeping Gabriele Monaco
2025-07-31 15:39   ` Waiman Long
2025-08-01 16:03     ` Gabriele Monaco [this message]
2025-07-30 13:11 ` [PATCH v9 8/8] timers: Exclude isolated cpus from timer migration Gabriele Monaco
2025-07-31 18:25   ` Waiman Long
2025-08-01 13:07     ` Frederic Weisbecker
2025-08-01 19:15       ` Waiman Long

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2788740ecc02ae70706506468bb71a1e23180cc.camel@redhat.com \
    --to=gmonaco@redhat.com \
    --cc=anna-maria@linutronix.de \
    --cc=frederic@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llong@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®