OpenVZ Forum - RDF feed
type: channel
items: [PATCH, v5 0/2] Timer slack cgroup subsystem
items: [PATCH, v5 1/2] cgroups: export cgroup_iter_{start, next, end}
items: [PATCH, v5 2/2] cgroups: introduce timer slack subsystem
items: Re: [PATCH, v5 1/2] cgroups: export cgroup_iter_{start, next, end}
items: Re: [PATCH, v5 2/2] cgroups: introduce timer slack subsystem

[PATCH, v5 0/2] Timer slack cgroup subsystem
type: item
description: From: Kirill A. Shutemov <kirill@shutemov.name> Changelog: v5: - -EBUSY on writing to timer_slack.min_slack_ns/max_slack_ns if a child has wider min-max range v4: - hierarchy support - drop dummy_timer_slack_check() - workaround lockdep false (?) positive - allow 0 as timer slack value v3: - rework interface - s/EXPORT_SYMBOL/EXPORT_SYMBOL_GPL/ v2: - fixed with CONFIG_CGROUP_TIMER_SLACK=y v1: - initial revision Kirill A. Shutemov (2): cgroups: export cgroup_iter_{start,next,end} cgroups: introduce timer slack subsystem include/linux/cgroup_subsys.h | 6 + include/linux/init_task.h | 4 +- init/Kconfig | 10 ++ kernel/Makefile | 1 + kernel/cgroup.c | 3 + kernel/cgroup_timer_slack.c | 281 +++++++++++++++++++++++++++++++++++++++++ kernel/sys.c | 19 ++- 7 files changed, 317 insertions(+), 7 deletions(-) create mode 100644 kernel/cgroup_timer_slack.c -- 1.7.4 _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containe rs
creator: Kirill A. Shutsemov
date: 2011-02-07T09:46:00-00:00

[PATCH, v5 1/2] cgroups: export cgroup_iter_{start, next, end}
type: item
description: From: Kirill A. Shutemov <kirill@shutemov.name> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> Acked-by: Paul Menage <menage@google.com> --- kernel/cgroup.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/cgroup.c b/kernel/cgroup.c index b24d702..8234daa 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -2443,6 +2443,7 @@ void cgroup_iter_start(struct cgroup *cgrp, struct cgroup_iter *it) it->cg_link = &cgrp->css_sets; cgroup_advance_iter(cgrp, it); } +EXPORT_SYMBOL_GPL(cgroup_iter_start); struct task_struct *cgroup_iter_next(struct cgroup *cgrp, struct cgroup_iter *it) @@ -2467,11 +2468,13 @@ struct task_struct *cgroup_iter_next(struct cgroup *cgrp, } return res; } +EXPORT_SYMBOL_GPL(cgroup_iter_next); void cgroup_iter_end(struct cgroup *cgrp, struct cgroup_iter *it) { read_unlock(&css_set_lock); } +EXPORT_SYMBOL_GPL(cgroup_iter_end); static inline int started_after_time(struct task_struct *t1, struct timespec *time, -- 1.7.4 _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containe rs
creator: Kirill A. Shutsemov
date: 2011-02-07T09:46:01-00:00

[PATCH, v5 2/2] cgroups: introduce timer slack subsystem
type: item
description: From: Kirill A. Shutemov <kirill@shutemov.name> Provides a way of tasks grouping by timer slack value. Introduces per cgroup max and min timer slack value. When a task attaches to a cgroup, its timer slack value adjusts (if needed) to fit min-max range. It also provides a way to set timer slack value for all tasks in the cgroup at once. This functionality is useful in mobile devices where certain background apps are attached to a cgroup and minimum wakeups are desired. Idea-by: Jacob Pan <jacob.jun.pan@linux.intel.com> Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> --- include/linux/cgroup_subsys.h | 6 + include/linux/init_task.h | 4 +- init/Kconfig | 10 ++ kernel/Makefile | 1 + kernel/cgroup_timer_slack.c | 281 +++++++++++++++++++++++++++++++++++++++++ kernel/sys.c | 19 ++- 6 files changed, 314 insertions(+), 7 deletions(-) create mode 100644 kernel/cgroup_timer_slack.c diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h index ccefff0..e399228 100644 --- a/include/linux/cgroup_subsys.h +++ b/include/linux/cgroup_subsys.h @@ -66,3 +66,9 @@ SUBSYS(blkio) #endif /* */ + +#ifdef CONFIG_CGROUP_TIMER_SLACK +SUBSYS(timer_slack) +#endif + +/* */ diff --git a/include/linux/init_task.h b/include/linux/init_task.h index caa151f..48eca8f 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -124,6 +124,8 @@ extern struct cred init_cred; # define INIT_PERF_EVENTS(tsk) #endif +#define TIMER_SLACK_NS_DEFAULT 50000 + /* * INIT_TASK is used to set up the first task table, touch at * your own risk!. Base=0, limit=0x1fffff (=2MB) @@ -177,7 +179,7 @@ extern struct cred init_cred; .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ .fs_excl = ATOMIC_INIT(0), \ .pi_lock = __RAW_SPIN_LOCK_UNLOCKED(tsk.pi_lock), \ - .timer_slack_ns = 50000, /* 50 usec default slack */ \ + .timer_slack_ns = TIMER_SLACK_NS_DEFAULT, \ .pids = { \ [PIDTYPE_PID] = INIT_PID_LINK(PIDTYPE_PID), \ [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ diff --git a/init/Kc…
creator: Kirill A. Shutsemov
date: 2011-02-07T09:46:02-00:00

Re: [PATCH, v5 1/2] cgroups: export cgroup_iter_{start, next, end}
type: item
description: * Kirill A. Shutsemov <kirill@shutemov.name> [2011-02-07 11:46:01]: > From: Kirill A. Shutemov <kirill@shutemov.name> > > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> > Acked-by: Paul Menage <menage@google.com> Acked-by: Balbir Singh <balbir@linux.vnet.ibm.com> -- Three Cheers, Balbir _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containe rs
creator: Balbir Singh
date: 2011-02-07T09:57:13-00:00

Re: [PATCH, v5 2/2] cgroups: introduce timer slack subsystem
type: item
description: * Kirill A. Shutsemov <kirill@shutemov.name> [2011-02-07 11:46:02]: > From: Kirill A. Shutemov <kirill@shutemov.name> > > Provides a way of tasks grouping by timer slack value. Introduces per > cgroup max and min timer slack value. When a task attaches to a cgroup, > its timer slack value adjusts (if needed) to fit min-max range. > > It also provides a way to set timer slack value for all tasks in the > cgroup at once. > > This functionality is useful in mobile devices where certain background > apps are attached to a cgroup and minimum wakeups are desired. > > Idea-by: Jacob Pan <jacob.jun.pan@linux.intel.com> > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> > --- > include/linux/cgroup_subsys.h | 6 + > include/linux/init_task.h | 4 +- > init/Kconfig | 10 ++ > kernel/Makefile | 1 + > kernel/cgroup_timer_slack.c | 281 +++++++++++++++++++++++++++++++++++++++++ > kernel/sys.c | 19 ++- > 6 files changed, 314 insertions(+), 7 deletions(-) > create mode 100644 kernel/cgroup_timer_slack.c > > diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h > index ccefff0..e399228 100644 > --- a/include/linux/cgroup_subsys.h > +++ b/include/linux/cgroup_subsys.h > @@ -66,3 +66,9 @@ SUBSYS(blkio) > #endif > > /* */ > + > +#ifdef CONFIG_CGROUP_TIMER_SLACK > +SUBSYS(timer_slack) > +#endif > + > +/* */ > diff --git a/include/linux/init_task.h b/include/linux/init_task.h > index caa151f..48eca8f 100644 > --- a/include/linux/init_task.h > +++ b/include/linux/init_task.h > @@ -124,6 +124,8 @@ extern struct cred init_cred; > # define INIT_PERF_EVENTS(tsk) > #endif > > +#define TIMER_SLACK_NS_DEFAULT 50000 > + > /* > * INIT_TASK is used to set up the first task table, touch at > * your own risk!. Base=0, limit=0x1fffff (=2MB) > @@ -177,7 +179,7 @@ extern struct cred init_cred; > .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ > .fs_excl = ATOMIC_INIT(0), \ > .pi_lock = __RAW_SPIN_LOCK_UNLOCKED(tsk.pi_lock), \ > - .timer_slack_ns = 50000, /* 50 usec default sla…
creator: Balbir Singh
date: 2011-02-07T10:06:24-00:00

Re: [PATCH, v5 2/2] cgroups: introduce timer slack subsystem
type: item
description: On Mon, Feb 07, 2011 at 03:36:24PM +0530, Balbir Singh wrote: > * Kirill A. Shutsemov <kirill@shutemov.name> [2011-02-07 11:46:02]: > > > From: Kirill A. Shutemov <kirill@shutemov.name> > > > > Provides a way of tasks grouping by timer slack value. Introduces per > > cgroup max and min timer slack value. When a task attaches to a cgroup, > > its timer slack value adjusts (if needed) to fit min-max range. > > > > It also provides a way to set timer slack value for all tasks in the > > cgroup at once. > > > > This functionality is useful in mobile devices where certain background > > apps are attached to a cgroup and minimum wakeups are desired. > > > > Idea-by: Jacob Pan <jacob.jun.pan@linux.intel.com> > > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> > > --- > > include/linux/cgroup_subsys.h | 6 + > > include/linux/init_task.h | 4 +- > > init/Kconfig | 10 ++ > > kernel/Makefile | 1 + > > kernel/cgroup_timer_slack.c | 281 +++++++++++++++++++++++++++++++++++++++++ > > kernel/sys.c | 19 ++- > > 6 files changed, 314 insertions(+), 7 deletions(-) > > create mode 100644 kernel/cgroup_timer_slack.c > > > > diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h > > index ccefff0..e399228 100644 > > --- a/include/linux/cgroup_subsys.h > > +++ b/include/linux/cgroup_subsys.h > > @@ -66,3 +66,9 @@ SUBSYS(blkio) > > #endif > > > > /* */ > > + > > +#ifdef CONFIG_CGROUP_TIMER_SLACK > > +SUBSYS(timer_slack) > > +#endif > > + > > +/* */ > > diff --git a/include/linux/init_task.h b/include/linux/init_task.h > > index caa151f..48eca8f 100644 > > --- a/include/linux/init_task.h > > +++ b/include/linux/init_task.h > > @@ -124,6 +124,8 @@ extern struct cred init_cred; > > # define INIT_PERF_EVENTS(tsk) > > #endif > > > > +#define TIMER_SLACK_NS_DEFAULT 50000 > > + > > /* > > * INIT_TASK is used to set up the first task table, touch at > > * your own risk!. Base=0, limit=0x1fffff (=2MB) > > @@ -177,7 +179,7 @@ extern struct cred init_cred; > > .cpu_timers =…
creator: Kirill A. Shutsemov
date: 2011-02-07T10:57:30-00:00

Re: [PATCH, v5 2/2] cgroups: introduce timer slack subsystem
type: item
description: * Kirill A. Shutemov <kirill@shutemov.name> [2011-02-07 12:57:30]: > On Mon, Feb 07, 2011 at 03:36:24PM +0530, Balbir Singh wrote: > > * Kirill A. Shutsemov <kirill@shutemov.name> [2011-02-07 11:46:02]: > > > > > From: Kirill A. Shutemov <kirill@shutemov.name> > > > > > > Provides a way of tasks grouping by timer slack value. Introduces per > > > cgroup max and min timer slack value. When a task attaches to a cgroup, > > > its timer slack value adjusts (if needed) to fit min-max range. > > > > > > It also provides a way to set timer slack value for all tasks in the > > > cgroup at once. > > > > > > This functionality is useful in mobile devices where certain background > > > apps are attached to a cgroup and minimum wakeups are desired. > > > > > > Idea-by: Jacob Pan <jacob.jun.pan@linux.intel.com> > > > Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name> > > > --- > > > include/linux/cgroup_subsys.h | 6 + > > > include/linux/init_task.h | 4 +- > > > init/Kconfig | 10 ++ > > > kernel/Makefile | 1 + > > > kernel/cgroup_timer_slack.c | 281 +++++++++++++++++++++++++++++++++++++++++ > > > kernel/sys.c | 19 ++- > > > 6 files changed, 314 insertions(+), 7 deletions(-) > > > create mode 100644 kernel/cgroup_timer_slack.c > > > > > > diff --git a/include/linux/cgroup_subsys.h b/include/linux/cgroup_subsys.h > > > index ccefff0..e399228 100644 > > > --- a/include/linux/cgroup_subsys.h > > > +++ b/include/linux/cgroup_subsys.h > > > @@ -66,3 +66,9 @@ SUBSYS(blkio) > > > #endif > > > > > > /* */ > > > + > > > +#ifdef CONFIG_CGROUP_TIMER_SLACK > > > +SUBSYS(timer_slack) > > > +#endif > > > + > > > +/* */ > > > diff --git a/include/linux/init_task.h b/include/linux/init_task.h > > > index caa151f..48eca8f 100644 > > > --- a/include/linux/init_task.h > > > +++ b/include/linux/init_task.h > > > @@ -124,6 +124,8 @@ extern struct cred init_cred; > > > # define INIT_PERF_EVENTS(tsk) > > > #endif > > > > > > +#define TIMER_SLACK_NS_DEFAULT 50000 > > > + > > > /* > > > * INIT_TASK…
creator: Balbir Singh
date: 2011-02-07T12:14:30-00:00

Re: [PATCH, v5 2/2] cgroups: introduce timer slack subsystem
type: item
description: On Mon, Feb 07, 2011 at 05:44:30PM +0530, Balbir Singh wrote: > * Kirill A. Shutemov <kirill@shutemov.name> [2011-02-07 12:57:30]: > > > On Mon, Feb 07, 2011 at 03:36:24PM +0530, Balbir Singh wrote: > > > 2. Can there be an overlap in the ranges? > > > > What overlap do you mean? > > There is only one rule: parent's range should be wider then child's. > > Between the children, can we have something like > > 10-200 > / \ > / \ > V V > 10-110 100-200 Yes, sure. -- Kirill A. Shutemov _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containe rs
creator: Kirill A. Shutsemov
date: 2011-02-07T12:26:28-00:00