[PATCH v2] man/man7/sched.7: Mention autogroup disabled behavior

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The autogroup feature can be contolled at runtime when
built into the kernel. Disabling it in this case still
creates autogroups and still shows the autogroup membership
for the task in /proc.  The scheduler code will just not
use the the autogroup task group.  This can be confusing
to users. Add a sentence to this effect to sched.7 to
point this out.

The kernel code shows how this is used. The
sched_autogroup_enabled toggle is only used in one place.

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;
}

task_wants_autogroup() is in kernel/sched/autogroup.c:

bool task_wants_autogroup(struct task_struct *p, struct task_group *tg)
{
        if (tg != &root_task_group)
                return false;
    ...

        return true;
}

One can see that any group set other than root also bypasses the use of
the autogroup.

All of the machinery around the creation of the autogroup is not
effected by the toggle.


[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux