lkml.org 
[lkml]   [2007]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-08-21 22:59    [W:0.020 / U:31.088 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site