Update of /cvsroot/linuxcompressed/linux/arch/i386
In directory usw-pr-cvs1:/tmp/cvs-serv17835/arch/i386
Modified Files:
config.in
Log Message:
New features
o Adaptivity: the greatest feature of the changeset is the adaptivity
implementation. Now compressed cache resizes by itself and it seems to
be picking the a size pretty close to the best size noticed in our
tests. The police can be described as follow. Instead of having an LRU
queue, we have now two queues: active and inactive, like the LRU
queues in vanilla. The active list has the pages that would be in
memory if the compressed cache is not used and the inactive list is
the gain from using the compressed cache. If there are many accesses
to the active list, we first block growing (by demand) and later
shrink the compressed cache, and if we have many accesses to the
inactive list, we let the cache grow if needed. The active list size
is computed based on the effective compression ratio (number of
fragments/number of memory pages). When shrinking the cache, we try to
free a compressed cache by moving its fragments to other places. If
unable to free a page that way, we free a fragment at the end of
inactive list.
o Compressed swap: now all swap cache pages are swapped out in
compressed format. A bit in swap_map array is used to know if the
entry is compressed or not. The compressed size is stored in the entry
on the disk. There is almost no cost to store the pages in compressed
format, that's why it is the default configuration for compressed
cache.
o Compacted swap: besides swapping out the pages in compressed format,
we may decrease the number of writeouts by writing many fragments to
the same disk block. Since it has a memory cost to store some
metadata, it is an option to be enabled by user. It uses two arrays,
real_swap (unsigned long array) and real_swap_map (unsigned short
array). All the metadata about the fragments in the disk block are
stored on the block, like offset, size, index.
o Clean fragments not decompressed when they would be used to write
some data. We don't decompress a clean fragment when grabbing a page
cache page in __grab_cache_page() any longer. We would decompress a
fragment, but it's data wouldn't be used (that's why this
__grab_cache_page() creates a page if not found in page cache). Dirty
fragments will be decompressed, but that's a rare situation in page
cache since most data are written via buffers.
Bug fixes
o Larger compressed cache page support would not support pages larger
than 2*PAGE_SIZE (8K). Reason: wrong computation of comp page size,
very simple to fix.
o In /proc/comp_cache_hist, we were showing the number of fragments in
a comp page, no matter if those fragments were freed. It has been
fixed to not show the freed fragments.
o Writing out every dirty page with buffers. That was a conceptual
bug, since all the swapped in pages would have bugs, and if they got
dirty, they would not be added to compressed cache as dirty, they
would be written out first and only then added to swap cache as a
clean page. Now we try to free the buffers and if we are unable to do
that, we write it out. With this bug, the page was added to compressed
cache, but we were forcing many writes.
Other:
o Removed support to change algorithms online. That was a not very
used option and would introduce a space cost to pages swapped out in
compressed format, so it was removed. It also saved some memory space,
since we allocate only the data structure used by the selected
algorithm. Recall that the algorithm can be set through the compalg=
kernel parameter.
o All entries in /proc/sys/vm/comp_cache removed. Since compression
algorithms cannot be changed nor compressed cache size, so it's
useless to have a directory in /proc/sys. Compressed cache size can
still be checked in /proc/meminfo.
o Info for compression algorithm is shown even if no page has been
compressed.
o There are many code blocks with "#if 0" that are/were being tested.
Cleanups:
o Code to add the fragment into a comp page fragment list was split to
a new function.
o decompress() function removed.
Index: config.in
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/arch/i386/config.in,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** config.in 28 Jul 2002 15:47:03 -0000 1.22
--- config.in 10 Sep 2002 16:42:58 -0000 1.23
***************
*** 212,215 ****
--- 212,216 ----
bool ' Support for Page Cache compression' CONFIG_COMP_PAGE_CACHE
bool ' Double Page Size' CONFIG_COMP_DOUBLE_PAGE
+ bool ' Compressed Swap' CONFIG_COMP_SWAP
fi
fi
|