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] [day] [month] [year] [list]
Date:	Thu, 11 Oct 2007 10:37:35 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Akinobu Mita <akinobu.mita@...il.com>
cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Pekka Enberg <penberg@...helsinki.fi>
Subject: Re: [PATCH -mm] slub: fix cpu hotplug offline/online path

On Thu, 11 Oct 2007, Akinobu Mita wrote:

> This is another approach for the fix.

Looks like the cleanest solution.

Acked-by: Christoph Lameter <clameter@....com>


> Use cpumask to check whether kmem_cache_cpu_free initalization for
> the CPU has already been done or not.
> 
> ---
>  mm/slub.c |    6 ++++++
>  1 file changed, 6 insertions(+)
> 
> Index: 2.6-mm/mm/slub.c
> ===================================================================
> --- 2.6-mm.orig/mm/slub.c
> +++ 2.6-mm/mm/slub.c
> @@ -1959,6 +1959,7 @@ static DEFINE_PER_CPU(struct kmem_cache_
>  				kmem_cache_cpu)[NR_KMEM_CACHE_CPU];
>  
>  static DEFINE_PER_CPU(struct kmem_cache_cpu *, kmem_cache_cpu_free);
> +static cpumask_t kmem_cach_cpu_free_init_once = CPU_MASK_NONE;
>  
>  static struct kmem_cache_cpu *alloc_kmem_cache_cpu(struct kmem_cache *s,
>  							int cpu, gfp_t flags)
> @@ -2033,8 +2034,13 @@ static void init_alloc_cpu_cpu(int cpu)
>  {
>  	int i;
>  
> +	if (cpu_isset(cpu, kmem_cach_cpu_free_init_once))
> +		return;
> +
>  	for (i = NR_KMEM_CACHE_CPU - 1; i >= 0; i--)
>  		free_kmem_cache_cpu(&per_cpu(kmem_cache_cpu, cpu)[i], cpu);
> +
> +	cpu_set(cpu, kmem_cach_cpu_free_init_once);
>  }
>  
>  static void __init init_alloc_cpu(void)
> 
-
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