Re: Checking page_count(page) in invalidate_complete_page

Andrew Morton
2006-09-28T17:03:06Z

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.