Re: [lc-devel] Modularising the compressed cache
Status: Beta
Brought to you by:
nitin_sf
From: David C. <dav...@rc...> - 2001-12-24 09:45:25
|
=A6b =B6g=A4=E9, 2001-12-23 22:19, Rodrigo Souza de Castro =BCg=B9D=A1G > Hi David, >=20 > On Sat, Dec 22, 2001 at 01:38:17AM +0800, David Chow wrote: > > Has anyone think of modularising the compressed cache > > implementation? I know the current implementation makes changes to > > the current swap cache. >=20 > What do you have in mind when talking about modularising this > implementation? >=20 > > I already have some ideas to modularise the swap system. This will > > also allow us to dynamically configure the compressed cache size at > > run time. >=20 > Could you tell us something about your ideas to modularise the swap > system. And in your opinion how that will help us to dynamically > configure the cache size? >=20 > Regards, > --=20 > Rodrigo S. de Castro <rc...@im...> You know, I've been working on the nfsswap for sometime. The nfsswap swap code that I am using simply modularise the swap sysstem. When we want to swap to nfs, we simply insmod the nfsswap.o and call register_swap_method() . We then patch all swap call to use operations like VFS. I just think if we define a compressed swap module, and implement something like a fs to hide all the compression tricks behind the kernel, then we can make compress swap + cache in our module instead of the swap_cache. By calling swapon we may add more swap space and cache just like calling swapon for files and partitions. Also, compress cache size then can be run time configured due to the separation and may be pass in as a module option some how. I just thought of this off my head and I hope this may work. Of course, there is no easy way to modularising the swap system. I have done some porting work using the nfsswap code with compressed cache at the same time and reporting no problems for use in production system more than 3 months. But I did not implement the compression in the swap since working on compressed swap require a lot more work. David |