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:	Wed, 13 Jul 2011 15:31:52 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Linux-MM <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>,
	David Miller <davem@...emloft.net>
Subject: Re: [PATCH 1/4] sparc64: Kill page table quicklists.

On Tue, 12 Jul 2011 14:26:09 +0200
Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:

> --- linux-2.6.orig/arch/sparc/mm/tsb.c
> +++ linux-2.6/arch/sparc/mm/tsb.c
> @@ -236,6 +236,8 @@ static void setup_tsb_params(struct mm_s
>  	}
>  }
>  
> +struct kmem_cache *pgtable_cache __read_mostly;
> +
>  static struct kmem_cache *tsb_caches[8] __read_mostly;
>  
>  static const char *tsb_cache_names[8] = {
> @@ -253,6 +255,15 @@ void __init pgtable_cache_init(void)
>  {
>  	unsigned long i;
>  
> +	pgtable_cache = kmem_cache_create("pgtable_cache",
> +					  PAGE_SIZE, PAGE_SIZE,
> +					  0,
> +					  _clear_page);

The use of slab constructors is often dubious from a cache usage POV. 
But the lifecycle of a page-table page might well be that it slowly
gets non-zeroes written into it and then slowly gets zeroes written
into it until it is all-zeroes and then we free it up.  And often only
a subset of the page will ever be written.

So it could be that the slab constructor behaviour is a good match
here.  And not just for sparc!

Did such thinking and/or any testing go into this decision?


> +	if (!pgtable_cache) {
> +		prom_printf("pgtable_cache_init(): Could not create!\n");
> +		prom_halt();
> +	}
> +
--
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