On Tue, 21 Aug 2007, Mel Gorman wrote: > > + */ > > +void release_lru_pages(struct list_head *page_list) > > +{ > > Can the migrate.c#putback_lru_pages() be replaced with this?
Correct. We can get rid of the putback_lru_pages in migrate.c with this. > > + struct page *page; > > + struct pagevec pvec; > > + struct zone *zone = NULL; > > + > > + pagevec_init(&pvec, 1); > > + while (!list_empty(page_list)) { > > + page = lru_to_page(page_list); > > + VM_BUG_ON(PageLRU(page)); > > + if (zone != page_zone(page)) { > > + if (zone) > > + spin_unlock_irq(&zone->lru_lock); > > + zone = page_zone(page); > > + spin_lock_irq(&zone->lru_lock); > > Is this really necessary? Why situation would occur that would have a > list of pages in multiple zones? Because we reclaim from multiple zones and gather laundry from different zones. > Also, it may be worth commenting here that __pagevec_release() is able to > handle lists of pages in multiple zones. Ok. > > __count_zone_vm_events(PGSCAN_DIRECT, zone, nr_scan); > > __count_zone_vm_events(PGSTEAL, zone, nr_freed); > > + local_irq_enable(); > > + release_lru_pages(&page_list); > > > > Separate these apart by a line. I thought the local_irq_enable() was related > to the call to release_lru_pages(&page_list) while reading the patch > which isn't the case at all. Will do. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/