lkml.org 
[lkml]   [1998]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: New Feature Idea: Compress swap file
>There's also the problem of mapping between swapped pages on disk and in
>memory. At the moment it's 4k in mem<->4k on disk, working out where the
>pages are going to and coming from is trivial and there's no real chance of
>fragmenting the swap space.

>If we compress, the pages on disk are variable sized, once you've paged in
>and out a few hundred times we could easilly fragment the swap space to hell
>:).

>Then what ?, stall while we defragment the swap space.

We could have a block/fragment scheme whereby a page would either be
uncompressed (uses a page of disk) or it would be compressed and use from 1 to
3 blocks of 1/4 the page size. This wouldn't be too difficult to setup and as
far as fragmentation goes, the worst case scenario is that it uses as much
disk space as an uncompressed swap partition... We could also have special
handling of pages that compress to 1/8th or 1/16th the page size (some will
compress even more than this by RLE alone).


Russell Coker

-
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:0.101 / U:0.516 seconds]
©2003-2014 Jasper Spaans. hosted at Digital Ocean