[lkml]   [2005]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: How to reclaim inode pages on demand
On Wed, 10 Aug 2005, Dave Hansen wrote:

> On Wed, 2005-08-10 at 18:27 +0100, Mel Gorman wrote:
> > I later linearly scan the mem_map looking for pages that can be freed up
> > (usually LRU pages). I was expecting any page with PG_inode set to have a
> > page->mapping but not all of them do. It is the pages without a ->mapping
> > that are confusing the hell out of me.
> How about putting a check for PG_inode and a periodic dump_stack()
> wherever page->mapping is cleared? That should at least let you catch
> the culprit who is clearing them. __remove_from_page_cache() is the only
> real place I see this being done.

Will do, it might shed some light on whats happening.

> Are you remembering to clean PG_inode when a page is freed?

Yes, I was using the allocator to count how many inode-related pages there
were in the system. The answer was lots, another reason why I'm thinking
that I picked the worst possible benchmark to test this stuff with.

> Perhaps
> it's allocated for the page cache, reclaimed, returned to the allocator,
> and reallocated as anonymous memory where you're seeing the null
> ->mapping. Might want to check for PG_inode in free_pages_check().

I am 99.99% certain I make that check but I can't double check the code
until late in the weekend.

Mel Gorman
Part-time Phd Student Java Applications Developer
University of Limerick IBM Dublin Software Lab
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-08-10 20:01    [W:0.047 / U:1.996 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site