[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0708211349160.3082@schroedinger.engr.sgi.com>
Date: Tue, 21 Aug 2007 13:51:11 -0700 (PDT)
From: Christoph Lameter <clameter@....com>
To: Mel Gorman <mel@...net.ie>
cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, dkegel@...gle.com,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
David Miller <davem@...emloft.net>,
Nick Piggin <npiggin@...e.de>
Subject: Re: [RFC 1/7] release_lru_pages(): Generic release of pages to the
LRU
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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists