+ mm-memory_hotplug-avoid-node_set-clear_staten_high_memory-when-config_highmem.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/memory_hotplug.c: avoid node_set/clear_state(N_HIGH_MEMORY) when !CONFIG_HIGHMEM
has been added to the -mm tree.  Its filename is
     mm-memory_hotplug-avoid-node_set-clear_staten_high_memory-when-config_highmem.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-memory_hotplug-avoid-node_set-clear_staten_high_memory-when-config_highmem.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-memory_hotplug-avoid-node_set-clear_staten_high_memory-when-config_highmem.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Oscar Salvador <osalvador@xxxxxxx>
Subject: mm/memory_hotplug.c: avoid node_set/clear_state(N_HIGH_MEMORY) when !CONFIG_HIGHMEM

Currently, when !CONFIG_HIGHMEM, status_change_nid_high is being set
to status_change_nid_normal, but on such systems N_HIGH_MEMORY falls
back to N_NORMAL_MEMORY.
That means that if status_change_nid_normal is not -1,
we will perform two calls to node_set_state for the same memory type.

Set status_change_nid_high to -1 for !CONFIG_HIGHMEM, so we skip the
double call in node_states_set_node.

The same goes for node_clear_state.

Link: http://lkml.kernel.org/r/20180919100819.25518-3-osalvador@xxxxxxxxxxxxxxxxxx
Signed-off-by: Oscar Salvador <osalvador@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/memory_hotplug.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/mm/memory_hotplug.c~mm-memory_hotplug-avoid-node_set-clear_staten_high_memory-when-config_highmem
+++ a/mm/memory_hotplug.c
@@ -731,7 +731,11 @@ static void node_states_check_changes_on
 	else
 		arg->status_change_nid_high = -1;
 #else
-	arg->status_change_nid_high = arg->status_change_nid_normal;
+	/*
+	 * When !CONFIG_HIGHMEM, N_HIGH_MEMORY equals N_NORMAL_MEMORY
+	 * so setting the node for N_NORMAL_MEMORY is enough.
+	 */
+	arg->status_change_nid_high = -1;
 #endif
 
 	/*
@@ -1555,7 +1559,11 @@ static void node_states_check_changes_of
 	else
 		arg->status_change_nid_high = -1;
 #else
-	arg->status_change_nid_high = arg->status_change_nid_normal;
+	/*
+	 * When !CONFIG_HIGHMEM, N_HIGH_MEMORY equals N_NORMAL_MEMORY
+	 * so clearing the node for N_NORMAL_MEMORY is enough.
+	 */
+	arg->status_change_nid_high = -1;
 #endif
 
 	/*
_

Patches currently in -mm which might be from osalvador@xxxxxxx are

mm-page_alloc-clean-up-check_for_memory.patch
mm-memory_hotplug-spare-unnecessary-calls-to-node_set_state.patch
mm-memory_hotplug-avoid-node_set-clear_staten_high_memory-when-config_highmem.patch
mm-memory_hotplug-tidy-up-node_states_clear_node.patch
mm-memory_hotplug-simplify-node_states_check_changes_online.patch
mm-memory_hotplug-clean-up-node_states_check_changes_offline.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux