diff options
author | Dan Williams <dan.j.williams@intel.com> | 2018-04-09 19:50:17 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-04-09 19:50:17 +0200 |
commit | e13e75b86ef2f88e3a47d672dd4c52a293efb95b (patch) | |
tree | 2617aebd952d1aec09d323f6b2484b93f659e753 /kernel/sched/autogroup.c | |
parent | Merge branch 'for-4.17/libnvdimm' into libnvdimm-for-next (diff) | |
parent | dax, dm: allow device-mapper to operate without dax support (diff) | |
download | linux-e13e75b86ef2f88e3a47d672dd4c52a293efb95b.tar.xz linux-e13e75b86ef2f88e3a47d672dd4c52a293efb95b.zip |
Merge branch 'for-4.17/dax' into libnvdimm-for-next
Diffstat (limited to 'kernel/sched/autogroup.c')
-rw-r--r-- | kernel/sched/autogroup.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/kernel/sched/autogroup.c b/kernel/sched/autogroup.c index bb4b9fe026a1..6be6c575b6cd 100644 --- a/kernel/sched/autogroup.c +++ b/kernel/sched/autogroup.c @@ -1,10 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 -#include <linux/proc_fs.h> -#include <linux/seq_file.h> -#include <linux/utsname.h> -#include <linux/security.h> -#include <linux/export.h> - +/* + * Auto-group scheduling implementation: + */ #include "sched.h" unsigned int __read_mostly sysctl_sched_autogroup_enabled = 1; @@ -168,18 +165,19 @@ autogroup_move_group(struct task_struct *p, struct autogroup *ag) autogroup_kref_put(prev); } -/* Allocates GFP_KERNEL, cannot be called under any spinlock */ +/* Allocates GFP_KERNEL, cannot be called under any spinlock: */ void sched_autogroup_create_attach(struct task_struct *p) { struct autogroup *ag = autogroup_create(); autogroup_move_group(p, ag); - /* drop extra reference added by autogroup_create() */ + + /* Drop extra reference added by autogroup_create(): */ autogroup_kref_put(ag); } EXPORT_SYMBOL(sched_autogroup_create_attach); -/* Cannot be called under siglock. Currently has no users */ +/* Cannot be called under siglock. Currently has no users: */ void sched_autogroup_detach(struct task_struct *p) { autogroup_move_group(p, &autogroup_default); @@ -202,7 +200,6 @@ static int __init setup_autogroup(char *str) return 1; } - __setup("noautogroup", setup_autogroup); #ifdef CONFIG_PROC_FS @@ -224,7 +221,7 @@ int proc_sched_autogroup_set_nice(struct task_struct *p, int nice) if (nice < 0 && !can_nice(current, nice)) return -EPERM; - /* this is a heavy operation taking global locks.. */ + /* This is a heavy operation, taking global locks.. */ if (!capable(CAP_SYS_ADMIN) && time_before(jiffies, next)) return -EAGAIN; @@ -267,4 +264,4 @@ int autogroup_path(struct task_group *tg, char *buf, int buflen) return snprintf(buf, buflen, "%s-%ld", "/autogroup", tg->autogroup->id); } -#endif /* CONFIG_SCHED_DEBUG */ +#endif |