linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2  0/2] Replace nr_node_ids for loop with for_each_node
@ 2015-09-15  2:08 Raghavendra K T
  2015-09-15  2:08 ` [PATCH V2 1/2] mm: Replace nr_node_ids for loop with for_each_node in list lru Raghavendra K T
  2015-09-15  2:08 ` [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes Raghavendra K T
  0 siblings, 2 replies; 8+ messages in thread
From: Raghavendra K T @ 2015-09-15  2:08 UTC (permalink / raw)
  To: benh, paulus, mpe, anton, akpm
  Cc: nacc, gkurz, grant.likely, nikunj, vdavydov, raghavendra.kt,
	linuxppc-dev, linux-kernel, linux-mm

Many places in the kernel use 'for' loop with nr_node_ids. For the architectures
which supports sparse numa ids, this will result in some unnecessary allocations
for non existing nodes.
(for e.g., numa node numbers such as 0,1,16,17 is common in powerpc.)

So replace the for loop with for_each_node so that allocations happen only for
existing numa nodes.

Please note that, though there are many places where nr_node_ids is used,
current patchset uses for_each_node only for slowpath to avoid find_next_bit
traversal.

Changes in V2:
  - Take memcg_aware check outside for_each loop (Vldimir)
  - Add comment that node 0 should always be present (Vladimir)

Raghavendra K T (2):
  mm: Replace nr_node_ids for loop with for_each_node in list lru
  powerpc:numa Do not allocate bootmem memory for non existing nodes

 arch/powerpc/mm/numa.c |  2 +-
 mm/list_lru.c          | 34 +++++++++++++++++++++++-----------
 2 files changed, 24 insertions(+), 12 deletions(-)

-- 
1.7.11.7

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-09-22 19:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-15  2:08 [PATCH V2 0/2] Replace nr_node_ids for loop with for_each_node Raghavendra K T
2015-09-15  2:08 ` [PATCH V2 1/2] mm: Replace nr_node_ids for loop with for_each_node in list lru Raghavendra K T
2015-09-15  2:17   ` Raghavendra K T
2015-09-15  7:59   ` Vladimir Davydov
2015-09-15  2:08 ` [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes Raghavendra K T
2015-09-22  5:29   ` Michael Ellerman
2015-09-22 10:48     ` Raghavendra K T
2015-09-22 19:36     ` Raghavendra K T

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).