All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nitin Gupta <ngupta@vflare.org>
To: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3]: compressed RAM block device
Date: Wed, 18 Mar 2009 18:08:30 +0530	[thread overview]
Message-ID: <49C0EB46.5050309@vflare.org> (raw)
In-Reply-To: <200903182325.21106.nickpiggin@yahoo.com.au>

Nick Piggin wrote:
> On Tuesday 17 March 2009 22:36:46 Nitin Gupta wrote:
>>   drivers/block/Kconfig     |   22 +
>>   drivers/block/Makefile    |    1 +
>>   drivers/block/compcache.c |  995
>> +++++++++++++++++++++++++++++++++++++++++++++ drivers/block/compcache.h | 
>> 160 ++++++++
>>   4 files changed, 1178 insertions(+), 0 deletions(-)
>>
>> Creates RAM based block device (ramzswap0) which can be used as swap
>> device. Pages swapped to this are compressed and stored in memory itself.
>>
>> The module is called compcache.ko. It depends on:
>>   - xvmalloc.ko: memory allocator
>>   - lzo_compress.ko
>>   - lzo_decompress.ko
>>
>> See Documentation/blockdev/compcache.txt for usage details.
>>
>> Project home: http://code.google.com/p/compcache/
> 

> I wonder how hard it would be to make the compression code
> use an arbitrary file or device for the storage backend rather
> than make a new block device? Then you could make a new ram
> block device that can swap its pages out (or even extend brd.c
> with that functionality, or use loop on tmpfs etc).
> 

Its already done as mentioned in Documentation/blockdev/compcache.txt
(patch 3/3) but I should have added it here also: compcache accepts
"backing_dev" parameter for backing swap partition - this allows us to
forward any R/W request to backing swap device. Currently only poorly
compressible pages (compress length > PAGE_SIZE/2) are forwarded to
backing_dev.

Thanks,
Nitin





  reply	other threads:[~2009-03-18 12:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17 11:34 [PATCH 0/3]: compressed in-memory swapping Nitin Gupta
2009-03-17 11:36 ` [PATCH 1/3]: compressed RAM block device Nitin Gupta
2009-03-18 12:25   ` Nick Piggin
2009-03-18 12:38     ` Nitin Gupta [this message]
2009-03-18 12:49       ` Nick Piggin
2009-03-20 18:56   ` Pavel Machek
2009-03-20 19:53     ` Nitin Gupta
2009-03-17 11:37 ` [PATCH 2/3]: xvmalloc memory allocator Nitin Gupta
2009-03-17 16:41   ` Christoph Lameter
2009-03-17 17:55     ` Nitin Gupta
     [not found]     ` <d760cf2d0903171028o600dc94cn7a5238520d104455@mail.gmail.com>
2009-03-17 17:58       ` Christoph Lameter
2009-03-17 18:34         ` Pekka Enberg
2009-03-18 16:07           ` Nitin Gupta
2009-03-18 15:17         ` Nitin Gupta
2009-03-18 16:58           ` Christoph Lameter
2009-03-18 17:29             ` Nitin Gupta
2009-03-18 19:21               ` Pekka Enberg
2009-03-18 19:36                 ` Nitin Gupta
2009-03-19  2:30                 ` Nitin Gupta
2009-03-19  6:08                   ` Pekka Enberg
2009-03-17 11:38 ` [PATCH 3/3]: documentation Nitin Gupta
2009-03-17 23:34 ` [PATCH 0/3]: compressed in-memory swapping Russ Dill
  -- strict thread matches above, loose matches on Subject: below --
2009-03-20 14:07 [PATCH 0/3] compressed in-memory swapping take2 Nitin Gupta
2009-03-20 14:10 ` [PATCH 1/3] compressed RAM block device Nitin Gupta

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49C0EB46.5050309@vflare.org \
    --to=ngupta@vflare.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.