Re: invalidate_inode_pages in 2.5.32/3

From: Andrew Morton (akpm@zip.com.au)
Date: Thu Sep 05 2002 - 13:27:54 EST


Chuck Lever wrote:
>
> hi all-
>
> it appears that changes in or around invalidate_inode_pages that went into
> 2.5.32/3 have broken certain cache behaviors that the NFS client depends
> on. when the NFS client calls invalidate_inode_pages to purge directory
> data from the page cache, sometimes it works as before, and sometimes it
> doesn't, leaving stale pages in the page cache.
>
> i don't know much about the MM, but i can reliably reproduce the problem.
> what more information can i provide? please copy me, as i'm not a member
> of the linux-kernel mailing list.

The locking became finer-grained.

Up to 2.5.31 or thereabouts, invalidate_inode_pages was grabbing
the global pagemap_lru_lock and walking all the inodes pages inside
that lock. This basically shuts down the entire VM for the whole
operation.

In 2.5.33, that lock is per-zone, and invalidate takes it on a
much more fine-grained basis.

That all assumes SMP/preempt. If you're seeing these problems on
uniproc/non-preempt then something fishy may be happening.

But be aware that invalidate_inode_pages has always been best-effort.
If someone is reading, or writing one of those pages then it
certainly will not be removed. If you need assurances that the
pagecache has been taken down then we'll need something stronger
in there.
-
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 : Sat Sep 07 2002 - 22:00:26 EST