Re: [PATCH -mm 16/25] SHM_LOCKED pages are non-reclaimable

From: KOSAKI Motohiro
Date: Sat Jun 07 2008 - 01:22:54 EST


Hi

> > +static void check_move_noreclaim_page(struct page *page, struct zone *zone)
> > +{
> > +
> > + ClearPageNoreclaim(page); /* for page_reclaimable() */
>
> Confused. Didn't we just lose track of our NR_NORECLAIM accounting?

I think this code is right.
this patch track it by below code.

but comments adding is better?


> > + if (page_reclaimable(page, NULL)) {
> > + enum lru_list l = LRU_INACTIVE_ANON + page_file_cache(page);
> > + __dec_zone_state(zone, NR_NORECLAIM);
> > + list_move(&page->lru, &zone->list[l]);
> > + __inc_zone_state(zone, NR_INACTIVE_ANON + l);
> > + } else {
> > + /*
> > + * rotate noreclaim list
> > + */
> > + SetPageNoreclaim(page);
> > + list_move(&page->lru, &zone->list[LRU_NORECLAIM]);
> > + }
> > +}




--
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/