lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6599ad830810230849x71961a0asd7f00d3baa2f2271@mail.gmail.com>
Date:	Thu, 23 Oct 2008 08:49:19 -0700
From:	"Paul Menage" <menage@...gle.com>
To:	bharata@...ux.vnet.ibm.com
Cc:	linux-kernel@...r.kernel.org,
	"Srivatsa Vaddagiri" <vatsa@...ux.vnet.ibm.com>,
	"Peter Zijlstra" <a.p.zijlstra@...llo.nl>,
	"Ingo Molnar" <mingo@...e.hu>
Subject: Re: [PATCH] Add hierarchical accounting to cpu accounting controller

On Wed, Oct 22, 2008 at 10:43 PM, Bharata B Rao
<bharata@...ux.vnet.ibm.com> wrote:
> ---
>  kernel/sched.c |   30 ++++++++++++++++++++++++------
>  1 file changed, 24 insertions(+), 6 deletions(-)
>
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -9131,10 +9131,15 @@ struct cpuacct {
>        struct cgroup_subsys_state css;
>        /* cpuusage holds pointer to a u64-type object on every cpu */
>        u64 *cpuusage;
> +       struct cpuacct *parent;
>  };
>
> +static struct cpuacct init_cpuacct_group;

Why are you making the root state static?

>  struct cgroup_subsys cpuacct_subsys;
>
> +#define for_each_cpuacct_group(ca) \
> +               for (; ca; ca = ca->parent)
> +

This is only used once, so doesn't seem worth creating a new macro for.

>
> +       if (cgrp->parent) {
> +               ca->css.cgroup = cgrp;

The cgroup pointer in the css is maintained by cgroups - you don't
need to set it.

Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ