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: <64330116-13ef-af3c-a445-f0c1b5bc1728@linux.intel.com>
Date:   Thu, 1 Feb 2018 14:50:19 -0800
From:   Tim Chen <tim.c.chen@...ux.intel.com>
To:     daniel.m.jordan@...cle.com, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Cc:     aaron.lu@...el.com, ak@...ux.intel.com, akpm@...ux-foundation.org,
        Dave.Dice@...cle.com, dave@...olabs.net,
        khandual@...ux.vnet.ibm.com, ldufour@...ux.vnet.ibm.com,
        mgorman@...e.de, mhocko@...nel.org, pasha.tatashin@...cle.com,
        steven.sistare@...cle.com, yossi.lev@...cle.com
Subject: Re: [RFC PATCH v1 03/13] mm: add lock array to pgdat and batch fields
 to struct page

On 01/31/2018 03:04 PM, daniel.m.jordan@...cle.com wrote:
> This patch simply adds the array of locks and struct page fields.
> Ignore for now where the struct page fields are: we need to find a place
> to put them that doesn't enlarge the struct.
> 
> Signed-off-by: Daniel Jordan <daniel.m.jordan@...cle.com>
> ---
>  include/linux/mm_types.h | 5 +++++
>  include/linux/mmzone.h   | 7 +++++++
>  mm/page_alloc.c          | 3 +++
>  3 files changed, 15 insertions(+)
> 
> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
> index cfd0ac4e5e0e..6e9d26f0cecf 100644
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -190,6 +190,11 @@ struct page {
>  		struct kmem_cache *slab_cache;	/* SL[AU]B: Pointer to slab */
>  	};
>  
> +	struct {
> +		unsigned lru_batch;
> +		bool lru_sentinel;

The above declaration adds at least 5 bytes to struct page.
It adds a lot of extra memory overhead when multiplied
by the number of pages in the system.

We can move sentinel bool to page flag, at least for 64 bit system.
And 8 bit is probably enough for lru_batch id to give a max 
lru_batch number of 256 to break the locks into 256 smaller ones.  
The max used in the patchset is 32 and that is already giving
pretty good spread of the locking.
It will be better if we can find some unused space in struct page
to squeeze it in.

Tim

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ