On Thu, 1 May 2014, Naoya Horiguchi wrote: > > diff --git a/mm/compaction.c b/mm/compaction.c > > --- a/mm/compaction.c > > +++ b/mm/compaction.c > > @@ -797,6 +797,19 @@ static struct page *compaction_alloc(struct page > > *migratepage, > > } > > > > /* > > + * This is a migrate-callback that "frees" freepages back to the isolated > > + * freelist. All pages on the freelist are from the same zone, so there > > is no > > + * special handling needed for NUMA. > > + */ > > +static void compaction_free(struct page *page, unsigned long data) > > +{ > > + struct compact_control *cc = (struct compact_control *)data; > > + > > + list_add(&page->lru, &cc->freepages); > > + cc->nr_freepages++; > > With this change, migration_page() handles cc->nr_freepages consistently, so > we don't have to run over freelist to update this count in > update_nr_listpages()? >
Good optimization, I'll add it! -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/