On Thu, Jan 19, 2017 at 11:47:09AM +0100, Vlastimil Babka wrote: > On 01/13/2017 08:14 AM, js1304@xxxxxxxxx wrote: > > From: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> > > > > It's inefficient to retrieve buddy information for fragmentation index > > calculation on every order. By using some stack memory, we could retrieve > > it once and reuse it to compute all the required values. MAX_ORDER is > > usually small enough so there is no big risk about stack overflow. > > > > Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> > > Sounds useful regardless of the rest of the series. > > Acked-by: Vlastimil Babka <vbabka@xxxxxxx> Thanks! I will submit this patch separately. > > A nit below. > > > --- > > mm/vmstat.c | 25 ++++++++++++------------- > > 1 file changed, 12 insertions(+), 13 deletions(-) > > > > diff --git a/mm/vmstat.c b/mm/vmstat.c > > index 7c28df3..e1ca5eb 100644 > > --- a/mm/vmstat.c > > +++ b/mm/vmstat.c > > @@ -821,7 +821,7 @@ unsigned long node_page_state(struct pglist_data *pgdat, > > struct contig_page_info { > > unsigned long free_pages; > > unsigned long free_blocks_total; > > - unsigned long free_blocks_suitable; > > + unsigned long free_blocks_order[MAX_ORDER]; > > No need to rename _suitable to _order IMHO. The meaning is still the > same, it's just an array now. For me a name "free_blocks_order" would > suggest it's just simple zone->free_area[order].nr_free. Okay. Will fix. 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>