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]
Date:	Thu, 20 May 2010 09:43:11 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Thomas Renninger <trenn@...e.de>
Cc:	peterz@...radead.org, mike@...roid.com,
	linux-kernel@...r.kernel.org, lizf@...fujitsu.com,
	menage@...gle.com, containers@...ts.linux-foundation.org,
	mingo@...e.hu
Subject: Re: [PATCH 2/2] scheduler: cgroups cpuaccouting: Make cpuusage
 atomic

On Wed, 19 May 2010 20:58:59 +0200
Thomas Renninger <trenn@...e.de> wrote:

> and avoid locking on 32 bit.
> This resolves an ugly dependency in cgroups_cpuaccount.c
> to per_cpu runqueues lock variable.
> 
> Signed-off-by: Thomas Renninger <trenn@...e.de>
> CC: linux-kernel@...r.kernel.org
> CC: mike@...roid.com
> CC: menage@...gle.com
> CC: lizf@...fujitsu.com
> CC: containers@...ts.linux-foundation.org
> CC: mingo@...e.hu
> CC: peterz@...radead.org
> ---
>  kernel/cgroup_cpuaccount.c |   39 +++++++++------------------------------
>  kernel/sched.c             |   11 -----------
>  kernel/sched.h             |    7 -------
>  3 files changed, 9 insertions(+), 48 deletions(-)
>  delete mode 100644 kernel/sched.h
> 
> diff --git a/kernel/cgroup_cpuaccount.c b/kernel/cgroup_cpuaccount.c
> index 0ad356a..0a53487 100644
> --- a/kernel/cgroup_cpuaccount.c
> +++ b/kernel/cgroup_cpuaccount.c
> @@ -10,8 +10,6 @@
>  
>  #include <asm/cputime.h>
>  
> -#include "sched.h"
> -
>  /*
>   * CPU accounting code for task groups.
>   *
> @@ -23,7 +21,7 @@
>  struct cpuacct {
>  	struct cgroup_subsys_state css;
>  	/* cpuusage holds pointer to a u64-type object on every cpu */
> -	u64 __percpu *cpuusage;
> +	atomic64_t __percpu *cpuusage;

Hmmm...how about adding seq_counter for 32bit rather than atomic64_t ?

Thanks,
-Kame

--
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