Re: Checking page_count(page) in invalidate_complete_page

Chuck Lever
2006-09-28T17:09:28Z

Andrew Morton wrote:
> On Thu, 28 Sep 2006 12:42:44 -0400
> Chuck Lever <chuck.lever@oracle.com> wrote:
>
>> Andrew Morton wrote:
>>> On Thu, 28 Sep 2006 09:36:40 -0700
>>> Andrew Morton <akpm@osdl.org> wrote:
>>>
>>>>> I think a call to lru_add_drain_all() belongs in both the
>>>>> invalidate_inode_pages() and the invalidate_inode_pages2() path. Do you
>>>>> agree?
>>>> Yes.
>>> Or maybe not. lru_add_drain() will only drain the local CPU's buffer. If
>>> the page is sitting in another CPU's buffer, the same problem will occur.
>>>
>>> IOW, you got lucky.
>> I used lru_add_drain_all(), so it hit all the per-CPU pagevecs.
>
> lru_add_drain_all() is a nasty, hacky, not-exported-to-modules thing. It
> equates to lru_add_drain() if !CONFIG_NUMA.
>
> Sigh, we're not getting there, are we?
>
> I'm still thinking we add invalidate_complete_page2() to get us out of
> trouble and park the problem :(. That'd be a good approach for 2.6.18.x,
> which I assume is fairly urgent.

Choosing which fix to include is above my pay grade. Both of these
proposals address the NFS readdir cache invalidation problem.

But it seems like there is a real problem here -- the pages that are
waiting to be added the LRU will always have a page count that is too
high for invalidate_inode_pages to work on them.