[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aOADr3PABpCs142e@uudg.org>
Date: Fri, 3 Oct 2025 14:11:11 -0300
From: "Luis Claudio R. Goncalves" <lgoncalv@...hat.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>, Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Waiman Long <longman@...hat.com>, Tejun Heo <tj@...nel.org>,
Johannes Weiner <hannes@...xchg.org>,
Michal Koutný <mkoutny@...e.com>,
Andrea Righi <righi.andrea@...il.com>,
Julia Lawall <Julia.Lawall@...ia.fr>,
Joseph Salisbury <joseph.salisbury@...cle.com>
Subject: Re: [PATCH] sched: cgroup: Move task_can_attach() to cpuset.c
On Fri, Oct 03, 2025 at 12:14:21PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <rostedt@...dmis.org>
>
> At our monthly stable meeting, we were talking about documenting non
> static functions and randomly picked a function to look at. That was
> task_can_attach(). It was then noticed that it's only used by
> cgroup/cpuset.c and nothing else. It's a simple function that doesn't
> reference anything unique to sched/core.c, hence there's no reason that
> function should be there.
>
> Move it to cgroup/cpuset.c as that's the only place it is used. Also make
> it a static inline as it is so small.
>
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>
> ---
> include/linux/sched.h | 1 -
> kernel/cgroup/cpuset.c | 19 +++++++++++++++++++
> kernel/sched/core.c | 19 -------------------
> 3 files changed, 19 insertions(+), 20 deletions(-)
That was a fun exercise. :)
Tested-by: Luis Claudio R. Goncalves <lgoncalv@...hat.com>
Powered by blists - more mailing lists