OpenVZ Forum - RDF feed
type: channel
items: [PATCH 1/2] CFS CGroup: Code cleanup
items: Re: [PATCH 1/2] CFS CGroup: Code cleanup

[PATCH 1/2] CFS CGroup: Code cleanup
type: item
description: Clean up some CFS CGroup code - replace "cont" with "cgrp" in a few places in the CFS cgroup code, - use write_uint rather than write for cpu.shares write function Signed-off-by: Paul Menage <menage@google.com> --- This is a resend of yesterday's mail with the same subject; the final hunk was missing from yesterday's patch. The second patch in the series was unaffected by this. kernel/sched.c | 53 ++++++++++++++++++----------------------------------- 1 file changed, 18 insertions(+), 35 deletions(-) Index: container-2.6.23-mm1/kernel/sched.c =================================================================== --- container-2.6.23-mm1.orig/kernel/sched.c +++ container-2.6.23-mm1/kernel/sched.c @@ -6936,25 +6936,25 @@ unsigned long sched_group_shares(struct #ifdef CONFIG_FAIR_CGROUP_SCHED /* return corresponding task_group object of a cgroup */ -static inline struct task_group *cgroup_tg(struct cgroup *cont) +static inline struct task_group *cgroup_tg(struct cgroup *cgrp) { - return container_of(cgroup_subsys_state(cont, cpu_cgroup_subsys_id), - struct task_group, css); + return container_of(cgroup_subsys_state(cgrp, cpu_cgroup_subsys_id), + struct task_group, css); } static struct cgroup_subsys_state * -cpu_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont) +cpu_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cgrp) { struct task_group *tg; - if (!cont->parent) { + if (!cgrp->parent) { /* This is early initialization for the top cgroup */ - init_task_group.css.cgroup = cont; + init_task_group.css.cgroup = cgrp; return &init_task_group.css; } /* we support only 1-level deep hierarchical scheduler atm */ - if (cont->parent->parent) + if (cgrp->parent->parent) return ERR_PTR(-EINVAL); tg = sched_create_group(); @@ -6962,21 +6962,21 @@ cpu_cgroup_create(struct cgroup_subsys * return ERR_PTR(-ENOMEM); /* Bind the cgroup to task_group object we just created */ - tg->css.cgroup = cont; + tg->css.cgroup = cgrp; return &tg->css; } static void cpu_cgroup_destroy…
creator: Paul Menage
date: 2007-10-24T02:32:27-00:00

Re: [PATCH 1/2] CFS CGroup: Code cleanup
type: item
description: On Tue, Oct 23, 2007 at 07:32:27PM -0700, Paul Menage wrote: > Clean up some CFS CGroup code > > - replace "cont" with "cgrp" in a few places in the CFS cgroup code, > - use write_uint rather than write for cpu.shares write function > > Signed-off-by: Paul Menage <menage@google.com> Acked-by : Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> -- Regards, vatsa _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Srivatsa Vaddagiri
date: 2007-10-24T04:35:16-00:00

Re: [PATCH 1/2] CFS CGroup: Code cleanup
type: item
description: * Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> wrote: > On Tue, Oct 23, 2007 at 07:32:27PM -0700, Paul Menage wrote: > > Clean up some CFS CGroup code > > > > - replace "cont" with "cgrp" in a few places in the CFS cgroup code, > > - use write_uint rather than write for cpu.shares write function > > > > Signed-off-by: Paul Menage <menage@google.com> > > Acked-by : Srivatsa Vaddagiri <vatsa@linux.vnet.ibm.com> thanks, applied. Ingo _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Ingo Molnar
date: 2007-10-24T06:50:19-00:00