Re: [PATCH 0/3] zram: generic RAM based compressed R/W blockdevices

From: Minchan Kim
Date: Tue May 25 2010 - 11:21:29 EST


Hi, Nitin.

On Mon, May 24, 2010 at 07:48:02PM +0530, Nitin Gupta wrote:
> Creates RAM based block devices: /dev/zramX (X = 0, 1, ...).
> Pages written to these disks are compressed and stored in memory
> itself. These disks allow very fast I/O and compression provides
> good amounts of memory savings.
>
> This is enhancement over existing ramzswap driver which creates
> virtual block devices (/dev/ramzswapX) which could be used only
> as swap disks.
>
> Now, with the ability to handle any kind of I/O request, zram
> devices have lot more use cases:
> - /tmp storage
> - various caches under /var
> - swap disks
> - maybe even more! :)

Wow, it looks good to me.

As a matter of fact, when I saw your descriptoin, I thought we can merge
your feature into brd. But I changed my mind due to following as

First of all, ramfs supports direct I/O. So it's hard to support compression.
If we can select optionable config, it would make brd code complicated or ugly.
That's because ramzswap uses own allocator, compression, extended ioctl and so on.
And some users might regard write with important than read without considering space.
So it would be better to keep other block device for easy use and clear code.

I will review this code when I have a time.
Thanks, Nitin.

--
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/