sched: Remove USER_SCHED
Subsystems (3)
Remove the USER_SCHED feature. It has been scheduled to be removed in 2.6.34 as per http://marc.info/?l=linux-kernel&m=125728479022976&w=2
--- Documentation/feature-removal-schedule.txt | 15 - include/linux/sched.h | 14 - init/Kconfig | 81 ++----- kernel/ksysfs.c | 8 kernel/sched.c | 114 ---------- kernel/sys.c | 5 kernel/user.c | 305 ----------------------------- 7 files changed, 38 insertions(+), 504 deletions(-)
init/Kconfig +30 -51
@@ -445,57 +445,6 @@ config LOG_BUF_SHIFT config HAVE_UNSTABLE_SCHED_CLOCK bool -config GROUP_SCHED - bool "Group CPU scheduler" - depends on EXPERIMENTAL - default n - help - This feature lets CPU scheduler recognize task groups and control CPU - bandwidth allocation to such task groups. - In order to create a group from arbitrary set of processes, use - CONFIG_CGROUPS. (See Control Group support.) - -config FAIR_GROUP_SCHED - bool "Group scheduling for SCHED_OTHER" - depends on GROUP_SCHED - default GROUP_SCHED - -config RT_GROUP_SCHED - bool "Group scheduling for SCHED_RR/FIFO" - depends on EXPERIMENTAL - depends on GROUP_SCHED - default n - help - This feature lets you explicitly allocate real CPU bandwidth - to users or control groups (depending on the "Basis for grouping tasks" - setting below. If enabled, it will also make it impossible to - schedule realtime tasks for non-root users until you allocate - realtime bandwidth for them. - See Documentation/scheduler/sched-rt-group.txt for more information. - -choice - depends on GROUP_SCHED - prompt "Basis for grouping tasks" - default USER_SCHED - -config USER_SCHED - bool "user id" - help - This option will choose userid as the basis for grouping - tasks, thus providing equal CPU bandwidth to each user. - -config CGROUP_SCHED - bool "Control groups" - depends on CGROUPS - help - This option allows you to create arbitrary task groups - using the "cgroup" pseudo filesystem and control - the cpu bandwidth allocated to each such task group. - Refer to Documentation/cgroups/cgroups.txt for more - information on "cgroup" pseudo filesystem. - -endchoice - menuconfig CGROUPS boolean "Control Group support" help
@@ -616,6 +565,36 @@ config CGROUP_MEM_RES_CTLR_SWAP Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page size is 4096bytes, 512k per 1Gbytes of swap. +menuconfig CGROUP_SCHED + bool "Group CPU scheduler" + depends on EXPERIMENTAL && CGROUPS + default n + help + This feature lets CPU scheduler recognize task groups and control CPU + bandwidth allocation to such task groups. It uses cgroups to group + tasks. + +if CGROUP_SCHED +config FAIR_GROUP_SCHED + bool "Group scheduling for SCHED_OTHER" + depends on CGROUP_SCHED + default CGROUP_SCHED + +config RT_GROUP_SCHED + bool "Group scheduling for SCHED_RR/FIFO" + depends on EXPERIMENTAL + depends on CGROUP_SCHED + default n + help + This feature lets you explicitly allocate real CPU bandwidth + to users or control groups (depending on the "Basis for grouping tasks" + setting below. If enabled, it will also make it impossible to + schedule realtime tasks for non-root users until you allocate + realtime bandwidth for them. + See Documentation/scheduler/sched-rt-group.txt for more information. + +endif #CGROUP_SCHED + endif # CGROUPS config MM_OWNER
Documentation/feature-removal-schedule.txt +0 -15
@@ -6,21 +6,6 @@ be removed from this file. --------------------------- -What: USER_SCHED -When: 2.6.34 - -Why: USER_SCHED was implemented as a proof of concept for group scheduling. - The effect of USER_SCHED can already be achieved from userspace with - the help of libcgroup. The removal of USER_SCHED will also simplify - the scheduler code with the removal of one major ifdef. There are also - issues USER_SCHED has with USER_NS. A decision was taken not to fix - those and instead remove USER_SCHED. Also new group scheduling - features will not be implemented for USER_SCHED. - -Who: Dhaval Giani <[email protected]> - ---------------------------- - What: PRISM54 When: 2.6.34
include/linux/sched.h +1 -13
@@ -736,14 +736,6 @@ struct user_struct {uid_t uid;struct user_namespace *user_ns; -#ifdef CONFIG_USER_SCHED -struct task_group *tg; -#ifdef CONFIG_SYSFS -struct kobject kobj; -struct delayed_work work; -#endif -#endif -#ifdef CONFIG_PERF_EVENTS atomic_long_t locked_vm;#endif
@@ -2513,13 +2505,9 @@ extern long sched_getaffinity(pid_t pid,extern void normalize_rt_tasks (void ); -#ifdef CONFIG_GROUP_SCHED +#ifdef CONFIG_CGROUP_SCHED extern struct task_group init_task_group; -#ifdef CONFIG_USER_SCHED -extern struct task_group root_task_group; -extern void set_tg_uid (struct user_struct *user); -#endif extern struct task_group *sched_create_group (struct task_group *parent);extern void sched_destroy_group (struct task_group *tg);
kernel/sched.c +7 -107
212 lines not on this page · raw message
kernel/user.c +0 -305
359 lines not on this page · raw message
kernel/ksysfs.c +0 -8
@@ -197,16 +197,8 @@ static int __init ksysfs_init(void) goto group_exit; } -/* create the /sys/kernel/uids/ directory */ - error =uids_sysfs_init (); -if (error) - goto notes_exit; -return 0 ; -notes_exit: -if (notes_size >0 ) -sysfs_remove_bin_file (kernel_kobj, ¬es_attr); group_exit:sysfs_remove_group (kernel_kobj, &kernel_attr_group); kset_exit:
kernel/sys.c +0 -5
@@ -569,11 +569,6 @@ static int set_user(struct cred *new)if (!new_user)return -EAGAIN ; -if (!task_can_switch_user (new_user, current)) { -free_uid (new_user); -return -EINVAL ; - } -if (atomic_read (&new_user->processes) >= current->signal->rlim[RLIMIT_NPROC ].rlim_cur && new_user !=INIT_USER ) {
Quoted 4 lines · Dhaval Giani
Remove the
USER_SCHEDfeature. It has been scheduled to be removed in 2.6.34 as per http://marc.info/?l=linux-kernel&m=125728479022976&w=2Signed-off-by Dhaval Giani <[email protected]>
Sorry, this is no longer correct. Corrected sign-off follows!
Commit-ID: 7c9414385ebfdd87cc542d4e7e3bb0dbb2d3ce25 Gitweb: http://git.kernel.org/tip/7c9414385ebfdd87cc542d4e7e3bb0dbb2d3ce25 Author: Dhaval Giani <[email protected]> AuthorDate: Wed, 20 Jan 2010 13:26:18 +0100 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 21 Jan 2010 13:40:18 +0100
sched: Remove USER_SCHED
Remove the USER_SCHED feature. It has been scheduled to be removed in 2.6.34 as per http://marc.info/?l=linux-kernel&m=125728479022976&w=2
LKML-Reference: <1263990378.24844.3.camel@localhost>
--- Documentation/feature-removal-schedule.txt | 15 -- include/linux/sched.h | 14 +-- init/Kconfig | 81 +++----- kernel/ksysfs.c | 8 - kernel/sched.c | 114 +---------- kernel/sys.c | 5 - kernel/user.c | 305 ---------------------------- 7 files changed, 38 insertions(+), 504 deletions(-)
Documentation/feature-removal-schedule.txt +0 -15
@@ -6,21 +6,6 @@ be removed from this file. --------------------------- -What: USER_SCHED -When: 2.6.34 - -Why: USER_SCHED was implemented as a proof of concept for group scheduling. - The effect of USER_SCHED can already be achieved from userspace with - the help of libcgroup. The removal of USER_SCHED will also simplify - the scheduler code with the removal of one major ifdef. There are also - issues USER_SCHED has with USER_NS. A decision was taken not to fix - those and instead remove USER_SCHED. Also new group scheduling - features will not be implemented for USER_SCHED. - -Who: Dhaval Giani <[email protected]> - ---------------------------- - What: PRISM54 When: 2.6.34
include/linux/sched.h +1 -13
@@ -731,14 +731,6 @@ struct user_struct {uid_t uid;struct user_namespace *user_ns; -#ifdef CONFIG_USER_SCHED -struct task_group *tg; -#ifdef CONFIG_SYSFS -struct kobject kobj; -struct delayed_work work; -#endif -#endif -#ifdef CONFIG_PERF_EVENTS atomic_long_t locked_vm;#endif
@@ -2502,13 +2494,9 @@ extern long sched_getaffinity(pid_t pid, struct cpumask *mask);extern void normalize_rt_tasks (void ); -#ifdef CONFIG_GROUP_SCHED +#ifdef CONFIG_CGROUP_SCHED extern struct task_group init_task_group; -#ifdef CONFIG_USER_SCHED -extern struct task_group root_task_group; -extern void set_tg_uid (struct user_struct *user); -#endif extern struct task_group *sched_create_group (struct task_group *parent);extern void sched_destroy_group (struct task_group *tg);
init/Kconfig +30 -51
93 lines not on this page · raw message
kernel/ksysfs.c +0 -8
@@ -197,16 +197,8 @@ static int __init ksysfs_init(void) goto group_exit; } -/* create the /sys/kernel/uids/ directory */ - error =uids_sysfs_init (); -if (error) - goto notes_exit; -return 0 ; -notes_exit: -if (notes_size >0 ) -sysfs_remove_bin_file (kernel_kobj, ¬es_attr); group_exit:sysfs_remove_group (kernel_kobj, &kernel_attr_group); kset_exit:
kernel/sched.c +7 -107
212 lines not on this page · raw message
kernel/sys.c +0 -5
@@ -569,11 +569,6 @@ static int set_user(struct cred *new)if (!new_user)return -EAGAIN ; -if (!task_can_switch_user (new_user, current)) { -free_uid (new_user); -return -EINVAL ; - } -if (atomic_read (&new_user->processes) >= current->signal->rlim[RLIMIT_NPROC ].rlim_cur && new_user !=INIT_USER ) {
kernel/user.c +0 -305
359 lines not on this page · raw message