Re: invalidate_inode_pages in 2.5.32/3

Trond Myklebust
2002-09-23T20:36:32Z

>>>>> " " == Andrew Morton <akpm@digeo.com> writes:

> Well it has to be a new thread, or user processes.

> Would it be possible to mark the inode as "needs invalidation",
> and make user processes check that flag once they have i_sem?

Not good enough unless you add those checks at the VFS/MM level. Think
for instance about mmap() where the filesystem is usually not involved
once a pagein has occurred.

> Do we really need to invalidate individual pages, or is it
> real-life acceptable to invalidate the whole mapping?

Invalidating the mapping is certainly a good alternative if it can be
done cleanly.
Note that in doing so, we do not want to invalidate any reads or
writes that may have been already scheduled. The existing mapping
still would need to hang around long enough to permit them to
complete.

> Doing an NFS-special invalidate function is not a problem, btw
> - my current invalidate_inode_pages() is just 25 lines. It's
> merely a matter of working out what it should do ;)

invalidate_inode_pages() *was* NFS-specific until you guys hijacked it
for other purposes in 2.5.x ;-)

Cheers,
Trond