* [RFC]about commit "[PATCH] Align the node_mem_map endpoints to a MAX_ORDER boundary"
@ 2013-03-20 9:35 Wang YanQing
0 siblings, 0 replies; only message in thread
From: Wang YanQing @ 2013-03-20 9:35 UTC (permalink / raw)
To: mgorman; +Cc: linux-mm, bob.picco
Hi Mel Gorman and all, could you explain the code snippet below in
commit e984bb43f7450312ba66fe0e67a99efa6be3b246
"[PATCH] Align the node_mem_map endpoints to a MAX_ORDER boundary"
this commit had getted your ack-by.
"
start = pgdat->node_start_pfn & ~(MAX_ORDER_NR_PAGES - 1);
end = pgdat->node_start_pfn + pgdat->node_spanned_pages;
end = ALIGN(end, MAX_ORDER_NR_PAGES);
size = (end - start) * sizeof(struct page);
map = alloc_remap(pgdat->node_id, size);
if (!map)
map = alloc_bootmem_node(pgdat, size);
pgdat->node_mem_map = map + (pgdat->node_start_pfn - start);
"
MY QUESTION IS WHY WE NEED THIS TWO LINES BELOW:
"
start = pgdat->node_start_pfn & ~(MAX_ORDER_NR_PAGES - 1);
"
and
"
pgdat->node_mem_map = map + (pgdat->node_start_pfn - start);
"
Maybe we don't need this trick and can save some hundred bytes.
Thanks.
--
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] only message in thread
only message in thread, other threads:[~2013-03-20 9:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-20 9:35 [RFC]about commit "[PATCH] Align the node_mem_map endpoints to a MAX_ORDER boundary" Wang YanQing
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).