lkml.org 
[lkml]   [2009]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH -mm] vmscan: merge duplicate code in shrink_active_list()
    Date
    > +void move_active_pages_to_lru(enum lru_list lru, struct list_head *list)

    it can be static?

    > +{
    > + unsigned long pgmoved = 0;
    > +
    > + while (!list_empty(&list)) {
    > + page = lru_to_page(&list);
    > + prefetchw_prev_lru_page(page, &list, flags);
    > +
    > + VM_BUG_ON(PageLRU(page));
    > + SetPageLRU(page);
    > +
    > + VM_BUG_ON(!PageActive(page));
    > + if (lru < LRU_ACTIVE)
    > + ClearPageActive(page);
    > +
    > + list_move(&page->lru, &zone->lru[lru].list);
    > + mem_cgroup_add_lru_list(page, lru);
    > + pgmoved++;
    > + if (!pagevec_add(&pvec, page)) {
    > + spin_unlock_irq(&zone->lru_lock);
    > + if (buffer_heads_over_limit)
    > + pagevec_strip(&pvec);
    > + __pagevec_release(&pvec);
    > + spin_lock_irq(&zone->lru_lock);
    > + }
    > + }
    > + __mod_zone_page_state(zone, NR_LRU_BASE + lru, pgmoved);
    > + if (lru < LRU_ACTIVE)
    > + __count_vm_events(PGDEACTIVATE, pgmoved);
    > +}




    \
     
     \ /
      Last update: 2009-05-12 05:01    [W:0.028 / U:60.256 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site