Re: Checking page_count(page) in invalidate_complete_page

Nick Piggin
2006-09-26T01:48:43Z

Chuck Lever wrote:

> Nick Piggin wrote:
>
>> I don't see where pagevec_strip calls get_page()?
>
>
> Ah, you're right, I was off by one symbol. The get_page call is in
> pagevec_lookup() (via find_get_pages). That could mean there isn't a
> reclaim race at all.

There will be transient (ie. race) conditions where the page count is
elevated for whatever
reason. Reclaim is one of those, so this failure you're seeing will need
to be fixed on the
NFS / invalidate side somehow.

>
> The page references I'm noting are:
>
> 1. add_to_page_cache_lru 1 -> 2
>
> 2. do_generic_mapping_read, released in nfs_do_filldir
>
> 3. read_cache_page, released in nfs_readdir
>
> 4. pagevec_lookup (from invalidate_inode_pages2_range) 2 -> 3
>
> The odd thing is some of the pages for the directory are released, so
> they must have a ref count of 2 *after* the pagevec_lookup. Looks
> like more investigation is needed.

Well they could get flushed out of the lru add pagevecs which drops
their count. Just to
test that theory you could run lru_add_drain_all() at the start of the
invalidate function.
That's not going to actually fix the problem, but it might help 2.6.18
limp along when
combined with some other work.

--

Send instant messages to your online friends http://au.messenger.yahoo.com