Hey Artur,
I am terribly sorry for the delay, this email fell into a black hole
in my mailbox.
On Tue, Sep 02, 2003 at 05:33:05PM +0200, Artur Wisz wrote:
> we are looking for possibilities of optimizing our embedded
> linux-based system, and wondering if we can benefit from using the
> compressed cache. We don't actually have swap disk in our system,
> but we do a lot of mmaps on a read-only slow memory medium (compact
> flash through USB). About 2/3 of the system memory is used up by our
> programs, and about 1/3 is used by the kernel cache. When the kernel
> needs more memory to satisfy user program requests, it has to remove
> some pages from the cache to free up some memory. Then when that
> data is needed again, it has to be read back from the slow medium. I
> can imagine that the kernel could compress some of the cache to free
> up the space instead of discarding it completely. Is this what this
> implementation of the compressed cache is about?
Exactly. We have a code which I named "virtual swap" to enable
compressed cache on swapless systems. And thanks to our page cache
support, you may benefit from compressed cache even without many swap
pages on your system (or even if you didn´t have the "virtual swap"
code).
Talking about its generic behaviour, CC will use part of your memory
to store pages in compressed format, in most cases being of great
utility to the system, which will benefit from avoiding reading these
pages from the backing store (in your case, a compact flash). We have
some policies to help us detect cases where CC is not worthless and
try to minimize its impact.
> And another question: what would be the effort to port this
> compressed cache to the ARM kernel ? We have the kernel 2.4.19.
I guess probably not very much, given that the person has an ARM box
to test it, what I don´t have currently. I may help as much as posible
someone how would like to do this port (having an ARM computer, of
course) or at least would help us testing it.
Please fell free to ask other questions, if you have.
Best regards,
--
Rodrigo
|