Re: Checking page_count(page) in invalidate_complete_page

Nick Piggin
2006-09-25T23:14:07Z

Steve Dickson wrote:

> Chuck Lever wrote:
>
>>
>> It seems that the NFS client could now safely use a page cache
>> invalidator that would wait for other page users to ensure that every
>> page is invalidated properly, instead of skipping the pages that
>> can't be immediately invalidated.
>>
>> In my opinion that would be the correct fix here for NFS.
>
> I would have to agree with this... in debugging this I
> changed the invalidate_inode_pages2 in nfs_revalidate_mapping
> to truncate_inode_pages() for non-file inode which also seem
> to work... So it does beg the question as to why aren't we
> waiting for page to be invalidated? Is there some type of
> VM deadlock we are trying to avoid?

Some kind of VM race.

http://marc.theaimsgroup.com/?l=linux-mm&m=115443228617576&w=2

It turns out that Andrew's patch that check page_count fixes the same
problem: It does so by ensuring nothing will touch this page before it
is invalidated; the patch at the above url[*] does so by ensuring just
page faults will not touch the page.

[*] has some implementation bugs so don't use it.

Andrew's patch solves a couple of silent data loss / corruption issues
so there is no option to circumvent it upstream.

--

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