Re: [patch] shrink inode fs-lowlevel memory when low on memory

Alexander Viro (viro@math.psu.edu)
Thu, 11 Feb 1999 06:47:06 -0500 (EST)


On Thu, 11 Feb 1999, Andrea Arcangeli wrote:

> On Thu, 11 Feb 1999, Andrea Arcangeli wrote:
>
> >>called by shrink_dcache() and be invisible for VM - after all, it's VFS
> >>business what to trim and what kind of balance should be kept between
> >>dcache, icache and fs-specific parts.
> >
> >Agreed, better to do the work in shrink_dcache(). Once you shrunk the
>
> I looked at the code and (even if I don't think it's a big issue for high
> memory machines) it's very simple to fix cleanly the lowlevel fs memory
> issue.
>
> We can simply clear the inode at iput() time.

Please, don't. Yes, it can be done. Except that you lose the caching
on inode level. Icache can keep inodes for some time after the last dcache
reference went away. It makes sense, since it saves us a read_inode() if
we are trying to get the same inode soon enough. Your change simply kills
icache. In its current form it gives some kind of aging for inodes. After
your change we may forget about it. Not good. shrink_dcache() is not the
only function that trims dcache. shrink_dcache_parent() is called in
situations having *nothing* with low-memory situations. Your change makes
it purge icache.

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