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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b04deb3f-bc3c-c78d-2774-125fa450ac42@microsoft.com>
Date:   Thu, 20 Sep 2018 20:53:48 +0000
From:   Pasha Tatashin <Pavel.Tatashin@...rosoft.com>
To:     Oscar Salvador <osalvador@...hadventures.net>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC:     "mhocko@...e.com" <mhocko@...e.com>,
        "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
        "david@...hat.com" <david@...hat.com>,
        "Jonathan.Cameron@...wei.com" <Jonathan.Cameron@...wei.com>,
        "yasu.isimatu@...il.com" <yasu.isimatu@...il.com>,
        "malat@...ian.org" <malat@...ian.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Oscar Salvador <osalvador@...e.de>
Subject: Re: [PATCH 1/5] mm/memory_hotplug: Spare unnecessary calls to
 node_set_state



On 9/19/18 6:08 AM, Oscar Salvador wrote:
> From: Oscar Salvador <osalvador@...e.de>
> 
> In node_states_check_changes_online, we check if the node will
> have to be set for any of the N_*_MEMORY states after the pages
> have been onlined.
> 
> Later on, we perform the activation in node_states_set_node.
> Currently, in node_states_set_node we set the node to N_MEMORY
> unconditionally.
> This means that we call node_set_state for N_MEMORY every time
> pages go online, but we only need to do it if the node has not yet been
> set for N_MEMORY.
> 
> Fix this by checking status_change_nid.
> 
> Signed-off-by: Oscar Salvador <osalvador@...e.de>

Reviewed-by: Pavel Tatashin <pavel.tatashin@...rosoft.com>

> ---
>  mm/memory_hotplug.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 38d94b703e9d..63facfc57224 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -753,7 +753,8 @@ static void node_states_set_node(int node, struct memory_notify *arg)
>  	if (arg->status_change_nid_high >= 0)
>  		node_set_state(node, N_HIGH_MEMORY);
>  
> -	node_set_state(node, N_MEMORY);
> +	if (arg->status_change_nid >= 0)
> +		node_set_state(node, N_MEMORY);
>  }
>  
>  static void __meminit resize_zone_range(struct zone *zone, unsigned long start_pfn,
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ