Re: behavior of zram stats, and zram allocation limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Feb 17, 2013 at 11:25:37AM +0800, Jaegeuk Hanse wrote:
> On 11/23/2012 01:51 PM, Minchan Kim wrote:
> >On Wed, Nov 21, 2012 at 02:58:48PM -0800, Luigi Semenzato wrote:
> >>Hi,
> >>
> >>Two questions for zram developers/users.  (Please let me know if it is
> >>NOT acceptable to use this list for these questions.)
> >>
> >>1. When I run a synthetic load using zram from kernel 3.4.0,
> >>compr_data_size from /sys/block/zram0 seems to decrease even though
> >>orig_data_size stays constant (see below).  Is this a bug that was
> >>fixed in a later release?  (The synthetic load is a bunch of processes
> >>that allocate memory, fill half of it with data from /dev/urandom, and
> >>touch the memory randomly.)  I looked at the code and it looks right.
> >>:-P
> >>
> >>2. Is there a way of setting the max amount of RAM that zram is
> >>allowed to allocate?  Right now I can set the size of the
> >>*uncompressed* swap device, but how much memory gets allocated depends
> >>on the compression ratio, which could vary.
> >There is no method to limit the RAM size but I think we can implement
> >it easily. The only thing we need is just a "voice of customer".
> >Why do you need it?
> 
> But in current codes, where implement limit to *uncompressed* swap
> device? I can't find it in zram_drv.c, could you point out to me?

Swap layer would manage it by get_swap_page.

- 
Kind regards,
Minchan Kim

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]