mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrea Righi <arighi@nvidia.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@kernel.org>,
	"Juri Lelli" <juri.lelli@redhat.com>,
	"Vincent Guittot" <vincent.guittot@linaro.org>,
	"Waiman Long" <longman@redhat.com>, "Tejun Heo" <tj@kernel.org>,
	"Johannes Weiner" <hannes@cmpxchg.org>,
	"Michal Koutný" <mkoutny@suse.com>,
	"Julia Lawall" <Julia.Lawall@inria.fr>,
	"Luis Claudio R. Goncalves" <lgoncalv@redhat.com>,
	"Joseph Salisbury" <joseph.salisbury@oracle.com>
Subject: Re: [PATCH] sched: cgroup: Move task_can_attach() to cpuset.c
Date: Fri, 3 Oct 2025 18:53:27 +0200	[thread overview]
Message-ID: <aN__h87LFTCG3jBp@gpd4> (raw)
In-Reply-To: <20251003124300.4698dd18@gandalf.local.home>

On Fri, Oct 03, 2025 at 12:43:00PM -0400, Steven Rostedt wrote:
...
> > > +static inline int task_can_attach(struct task_struct *p)
> > > +{
> > > +	int ret = 0;
> > > +
> > > +	/*
> > > +	 * Kthreads which disallow setaffinity shouldn't be moved
> > > +	 * to a new cpuset; we don't want to change their CPU
> > > +	 * affinity and isolating such threads by their set of
> > > +	 * allowed nodes is unnecessary.  Thus, cpusets are not
> > > +	 * applicable for such threads.  This prevents checking for
> > > +	 * success of set_cpus_allowed_ptr() on all attached tasks
> > > +	 * before cpus_mask may be changed.
> > > +	 */
> > > +	if (p->flags & PF_NO_SETAFFINITY)
> > > +		ret = -EINVAL;
> > > +
> > > +	return ret;  
> > 
> > As we're cleaning up, we could just return -EINVAL and 0 directly and get
> > rid of that ret variable.
> 
> That should be a separate patch. Moves should really not do much else. I
> even wondered about making it a static inline too, but figured that wasn't
> touching the logic, and the function was going to become static anyway.

Oh yes, good point. In the meantime, FWIW:

Tested-by: Andrea Righi <arighi@nvidia.com>

Thanks,
-Andrea

  reply	other threads:[~2025-10-03 16:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-03 16:14 Steven Rostedt
2025-10-03 16:36 ` Andrea Righi
2025-10-03 16:43   ` Steven Rostedt
2025-10-03 16:53     ` Andrea Righi [this message]
2025-10-03 16:39 ` Waiman Long
2025-10-03 17:11 ` Luis Claudio R. Goncalves
2025-10-03 19:56 ` [External] : " Joseph Salisbury
2025-10-03 21:38 ` Tejun Heo
2025-10-06 18:31   ` Peter Zijlstra
2025-10-06 18:59     ` Tejun Heo

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=aN__h87LFTCG3jBp@gpd4 \
    --to=arighi@nvidia.com \
    --cc=Julia.Lawall@inria.fr \
    --cc=hannes@cmpxchg.org \
    --cc=joseph.salisbury@oracle.com \
    --cc=juri.lelli@redhat.com \
    --cc=lgoncalv@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=mingo@kernel.org \
    --cc=mkoutny@suse.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tj@kernel.org \
    --cc=vincent.guittot@linaro.org \
    /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®