[RFC]about commit "[PATCH] Align the node_mem_map endpoints to a MAX_ORDER boundary"

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

 



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@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]