lkml.org 
[lkml]   [2008]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -mm 16/25] SHM_LOCKED pages are non-reclaimable
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]);
> > + }
> > +}






\
 
 \ /
  Last update: 2008-06-07 07:25    [W:0.139 / U:1.712 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site