[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250116141445.GB7382@pauld.westford.csb>
Date: Thu, 16 Jan 2025 09:14:45 -0500
From: Phil Auld <pauld@...hat.com>
To: Alejandro Colomar <alx@...nel.org>
Cc: linux-man@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] sched: Mention autogroup disabled behavior
On Thu, Jan 16, 2025 at 02:59:20PM +0100 Alejandro Colomar wrote:
> Hi Phil,
>
> On Thu, Jan 16, 2025 at 08:53:15AM -0500, Phil Auld wrote:
> > This is actually part of the problem. It's very hard to see this
> > from userspace. I can show a shell session that shows that autogroup
> > is disabled and that my task has an autogroup in /proc but determining
> > that the autogroup is not being used not so much. (I may be missing
> > something obvious but I could not find it).
> >
> > I had to look at the kernel code:
> >
> > kernel/sched/autogroup.h:
> > static inline struct task_group *
> > autogroup_task_group(struct task_struct *p, struct task_group *tg)
> > {
> > extern unsigned int sysctl_sched_autogroup_enabled;
> > int enabled = READ_ONCE(sysctl_sched_autogroup_enabled);
> >
> > if (enabled && task_wants_autogroup(p, tg))
> > return p->signal->autogroup->tg;
> >
> > return tg;
> > }
> >
> > bool task_wants_autogroup(struct task_struct *p, struct task_group *tg)
> > {
> > if (tg != &root_task_group)
> > return false;
> > ...
> >
> > }
> >
> > The former being called from sched_group_fork() and sched_get_task_group().
> >
> > I suppose looking at /proc/pid/cgroup and seeing it report not "0::/"
> > is part of it since it then won't be in root task group.
> >
> > To some extent any systemd based system these days is not really
> > using autogroup at all anyway.
> >
> > I can put some of the above in there or just something like:
> >
> > # cat /proc/sys/kernel/sched_autogroup_enabled
> > 0
> > # cat /proc/$$/autogroup
> > /autogroup-112 nice 0
> >
> >
> > Thoughts?
>
> Both. :)
>
> The more information we have in the commit message, the better (in case
> someone needs to check in the future, that will give more context).
>
Okay, fair enough. Will do. It was just hard for me to show that the
listed autogroup is not really being used.
I'll put the above in there and send v2.
Thanks!
Cheers,
Phil
>
> Cheers,
> Alex
>
> --
> <https://www.alejandro-colomar.es/>
--
Powered by blists - more mailing lists