lkml.org 
[lkml]   [1998]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: New Feature Idea: Compress swap file
On Thu, 19 Feb 1998, docwhat@gerf.org ;The Doctor What wrote:

> Can't optimize this by compressing on a per page basis? I'm not overly

It could, but you can never be sure exactly how big
the page will be. It might even end up bigger than
the uncompressed one, but you can't just allocate
3k/page, because you'll get stuck on several pages
that way.

> familiar with the theory, but it seems that there is less to compress
> (yeah, the compression isn't as good) and less for the CPU to worry about.

In 2^12 bits (one page) you have 2^12 possible
patterns. You can't guarantee to compress each
of those, since there are only 2^12 - 1 patterns
with less bits.

Therefore, some pages can't be properly compressed
and you'll need all kinds of fancy bookkeeping that
may just compensate for the possible benefit...

Rik.
+-----------------------------+------------------------------+
| For Linux mm-patches, go to | "I'm busy managing memory.." |
| my homepage (via LinuxHQ). | H.H.vanRiel@fys.ruu.nl |
| ...submissions welcome... | http://www.fys.ruu.nl/~riel/ |
+-----------------------------+------------------------------+


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:1.894 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site