lkml.org 
[lkml]   [2008]   [Jun]   [7]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 07 Jun 2008 14:21:40 +0900
FromKOSAKI Motohiro <>
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    [from the cache]
©2003-2008