All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: Ingo Molnar <mingo@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Seiji Nishikawa <snishika@redhat.com>,
	Mian Yousaf Kaukab <ykaukab@suse.de>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3] sched/rt: Do not account migrate-disabled tasks as pushable
Date: Thu, 19 Nov 2026 16:28:27 +0100	[thread overview]
Message-ID: <20261119152827.GG2669272@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20261119151739.GF2669272@noisy.programming.kicks-ass.net>

On Thu, Nov 19, 2026 at 04:17:40PM +0100, Peter Zijlstra wrote:
> On Thu, Nov 19, 2026 at 04:08:12PM +0100, Peter Zijlstra wrote:
> > On Thu, Nov 19, 2026 at 12:06:21PM +0000, Mel Gorman wrote:
> > 
> > > > > > Suppose:
> > > > > > 
> > > > > >   migrate_disable();
> > > > > >   ...
> > > > > >   schedule()
> > > > > >     migrate_disable_switch()
> > > > > >       // switches p->cpus_ptr and p->nr_cpus_allowed
> > > > > >     pick_next_task()
> > > > > >       p = class->pick_task();
> > > > > >       put_prev_set_next_task(rq, rq->donor, p);
> > > > > >       return p;
> > > > > > 
> > > > > > So any task that ends up in put_prev_task_rt() wlll have passed through
> > > > > > migrate_disable_switch(), which have updated nr_cpus_allowed.
> > > > > > 
> > > 
> > > Short summary, this assumption is wrong, nr_cpus_allowed is not updated
> > > in that path.
> 
> > Bah, and I cannot remember either. Let me have a poke, see if something
> > bubbles up.
> 
> So this version did update nr_cpus_allowed:
> 
> https://patch.msgid.link/20200921163845.769861942%40infradead.org
> 
> And the next version it did not:
> 
> https://patch.msgid.link/20201005150921.859981475%40infradead.org
> 
> But I can't seem to locate quite yet why it changed.

Tada!

https://patch.msgid.link/20200924123527.GJ2628%40hirez.programming.kicks-ass.net

I'm leaning towards "we got it wrong" on this.

  reply	other threads:[~2026-11-19 15:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-13 16:06 [PATCH v3] sched/rt: Do not account migrate-disabled tasks as pushable Mel Gorman
2026-11-17 14:27 ` Mel Gorman
2026-11-17 15:10   ` Peter Zijlstra
2026-11-17 15:20 ` Peter Zijlstra
2026-11-17 15:24   ` Peter Zijlstra
2026-11-18 10:05     ` Mel Gorman
2026-11-19 12:06       ` Mel Gorman
2026-11-19 15:08         ` Peter Zijlstra
2026-11-19 15:17           ` Peter Zijlstra
2026-11-19 15:28             ` Peter Zijlstra [this message]
2026-11-19 16:40               ` Peter Zijlstra
2026-11-19 23:34                 ` Mel Gorman
2026-11-19 16:53           ` Mel Gorman
2026-11-17 15:25   ` Steven Rostedt

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=20261119152827.GG2669272@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=snishika@redhat.com \
    --cc=vincent.guittot@linaro.org \
    --cc=ykaukab@suse.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.