Re: [PATCH -mm] vmscan: merge duplicate code in shrink_active_list()

From: KOSAKI Motohiro
Date: Mon May 11 2009 - 22:58:45 EST


> +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);
> +}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/