All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Michal Koutný" <mkoutny@suse.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	mm-commits@vger.kernel.org, yu.c.chen@intel.com,
	vineethr@linux.ibm.com, venkat88@linux.ibm.com, tj@kernel.org,
	tim.c.chen@intel.com, shakeel.butt@linux.dev,
	roman.gushchin@linux.dev, muchun.song@linux.dev,
	mingo@redhat.com, mhocko@kernel.org, mgorman@suse.de,
	kprateek.nayak@amd.com, hannes@cmpxchg.org, corbet@lwn.net,
	Ayush.jain3@amd.com, aubrey.li@intel.com, libo.chen@oracle.com
Subject: Re: [merged mm-stable] sched-numa-fix-task-swap-by-skipping-kernel-threads.patch removed from -mm tree
Date: Thu, 22 May 2025 10:23:32 +0200	[thread overview]
Message-ID: <20250522082332.GH24938@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <yf637jkmcdunhgs6qjbnprygpkifnphdcqofp546dd6ti6s6i4@b2geqedevt42>

On Thu, May 22, 2025 at 10:19:29AM +0200, Michal Koutný wrote:
> On Wed, May 21, 2025 at 09:11:14PM +0200, Peter Zijlstra <peterz@infradead.org> wrote:
> > > @@ -2273,7 +2273,8 @@ static bool task_numa_compare(struct tas
> > >  
> > >  	rcu_read_lock();
> > >  	cur = rcu_dereference(dst_rq->curr);
> > > -	if (cur && ((cur->flags & PF_EXITING) || is_idle_task(cur)))
> > > +	if (cur && ((cur->flags & PF_EXITING) || is_idle_task(cur) ||
> > > +		    !cur->mm))
> > 
> > !->mm is not the right way to determine a kernel thread, PF_KTHREAD is.
> > Notably, there are kernel threads that have ->mm.
> 
> How does this compose with the NUMA balancing? Should kernel threads
> with ->mm be considered here? (I don't know thus asking.)

I don't know either -- I've not thought about it, I just reacted to the
difference in changelog/comment and code.

Typically the kthreads with mm are io-uring threads. And I just don't
know enough about those.

  reply	other threads:[~2025-05-22  8:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-21 16:56 [merged mm-stable] sched-numa-fix-task-swap-by-skipping-kernel-threads.patch removed from -mm tree Andrew Morton
2025-05-21 19:11 ` Peter Zijlstra
2025-05-21 20:58   ` Andrew Morton
2025-05-22  6:31     ` K Prateek Nayak
2025-05-22 10:01       ` Libo Chen
2025-05-22 21:56         ` Andrew Morton
2025-05-23  7:48           ` Chen, Yu C
2025-05-22  8:19   ` Michal Koutný
2025-05-22  8:23     ` Peter Zijlstra [this message]
2025-05-22  8:36     ` Libo Chen
2025-05-23  5:09   ` Chen, Yu C
2025-05-23  8:21     ` Libo Chen
  -- strict thread matches above, loose matches on Subject: below --
2025-06-01  5:47 Andrew Morton

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=20250522082332.GH24938@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=Ayush.jain3@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=aubrey.li@intel.com \
    --cc=corbet@lwn.net \
    --cc=hannes@cmpxchg.org \
    --cc=kprateek.nayak@amd.com \
    --cc=libo.chen@oracle.com \
    --cc=mgorman@suse.de \
    --cc=mhocko@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mkoutny@suse.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeel.butt@linux.dev \
    --cc=tim.c.chen@intel.com \
    --cc=tj@kernel.org \
    --cc=venkat88@linux.ibm.com \
    --cc=vineethr@linux.ibm.com \
    --cc=yu.c.chen@intel.com \
    /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.