Re: invalidate_inode_pages in 2.5.32/3

From: Daniel Phillips (phillips@arcor.de)
Date: Thu Sep 12 2002 - 16:15:56 EST


On Thursday 12 September 2002 20:21, Andrew Morton wrote:
> Trond Myklebust wrote:
> >
> > >>>>> " " == Chuck Lever <cel@citi.umich.edu> writes:
> >
> > > rpciod must never call a function that sleeps. if this
> > > happens, the whole NFS client stops working until the function
> > > wakes up again. this is not really bogus -- it is similar to
> > > restrictions placed on socket callbacks.
> >
> > I'm in France at the moment, and am therefore not really able to
> > follow up on this thread for the moment. I'll try to clarify the above
> > though:
> >
> > 2 reasons why rpciod cannot block:
> >
> > 1) Doing so will slow down I/O for *all* NFS users.
> > 2) There's a minefield of possible deadlock situations: waiting on a
> > locked page is the main no-no since rpciod itself is the process
> > that needs to complete the read I/O and unlock the page.
> >
>
> Yes. Both of these would indicate that rpciod is the wrong process
> to be performing the invalidation.
>
> Is it not possible to co-opt a user process to perform the
> invalidation? Just
>
> inode->is_kaput = 1;
>
> in rpciod?

There must be a way. The key thing the VM needs to provide, and doesn't
now, is a function callable by the rpciod that will report to the caller
whether it was able to complete the invalidation without blocking. (I
think I'm just rephrasing someone's earlier suggestion here.)

I'm now thinking in general terms about how to concoct a mechanism
that lets rpciod retry the invalidation later, for all those that turn
out to be blocking. For example, rpciod could just keep a list of
all pending invalidates and retry each inode on the list every time
it has nothing to do. This is crude and n-squarish, but it would
work. Maybe it's efficient enough for the time being. At least it's
correct, which would be a step forward.

Did you have some specific mechanism in mind?

-- 
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Sep 15 2002 - 22:00:30 EST