On Thu, 24 Feb 2000, Rik van Riel wrote:
> On Thu, 24 Feb 2000, Tigran Aivazian wrote:
> > > I'm trying to implement a cache in a module.
> > presumably you have investigated using general-purpose cache
> > manager, i.e. slab allocator and found it to be inadequate for
> > your specific needs?
> No memory pressure is exerted on the slab cache, all we
> do is agressively reclaim pages that contain unused
> entries only...
I thought my example of inodes was trying to say exactly the same, i.e.
even if one frees lots of objects living in the same pages as some other
objects which are not unused then reaping the slab cache won't resolve the
> I think registering a cache with do_try_to_free_pages()
> is a good idea. It allows for a more flexible architecture
> where drivers can register and unregister caches at their
> whim and still have their caches shrunk on demand if there's
> memory pressure.
definitely. Not just drivers, but filesystems too. (but you probably meant
that inclusive). E.g. I like the Linux idea of filesystem-independent
inode cache (because it makes easy to write a filesystem) but sometimes
subsystem-specific caches do make sense, i.e. when a subsystem can predict
the usage pattern better than even the best GP cache manager like slab
Tigran A. Aivazian | http://www.sco.com
Escalations Research Group | tel: +44-(0)1923-813796
Santa Cruz Operation Ltd | http://www.ocston.org/~tigran
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Tue Feb 29 2000 - 21:00:10 EST