+ mm-page-refine-the-calculation-of-highest-possible-node-id.patch added to -mm tree

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

 



The patch titled
     Subject: mm/page_alloc.c: refine the calculation of highest possible node id
has been added to the -mm tree.  Its filename is
     mm-page-refine-the-calculation-of-highest-possible-node-id.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-page-refine-the-calculation-of-highest-possible-node-id.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-page-refine-the-calculation-of-highest-possible-node-id.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/SubmitChecklist when testing your code ***

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

------------------------------------------------------
From: Wei Yang <weiyang@xxxxxxxxxxxxxxxxxx>
Subject: mm/page_alloc.c: refine the calculation of highest possible node id

nr_node_ids records the highest possible node id, which is calculated by
scanning the bitmap node_states[N_POSSIBLE].  Current implementation scan
the bitmap from the beginning, which will scan the whole bitmap.

This patch reverses the order by scanning from the end with
find_last_bit().

Signed-off-by: Wei Yang <weiyang@xxxxxxxxxxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/page_alloc.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff -puN mm/page_alloc.c~mm-page-refine-the-calculation-of-highest-possible-node-id mm/page_alloc.c
--- a/mm/page_alloc.c~mm-page-refine-the-calculation-of-highest-possible-node-id
+++ a/mm/page_alloc.c
@@ -5448,11 +5448,9 @@ void __paginginit free_area_init_node(in
  */
 void __init setup_nr_node_ids(void)
 {
-	unsigned int node;
-	unsigned int highest = 0;
+	unsigned int highest;
 
-	for_each_node_mask(node, node_possible_map)
-		highest = node;
+	highest = find_last_bit(node_possible_map.bits, MAX_NUMNODES);
 	nr_node_ids = highest + 1;
 }
 #endif
_

Patches currently in -mm which might be from weiyang@xxxxxxxxxxxxxxxxxx are

mm-memblock-warn_on-when-nid-differs-from-overlap-region.patch
mm-page-refine-the-calculation-of-highest-possible-node-id.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux