All of lore.kernel.org
 help / color / mirror / Atom feed
From: Minchan Kim <minchan@kernel.org>
To: Jaegeuk Hanse <jaegeuk.hanse@gmail.com>
Cc: Luigi Semenzato <semenzato@google.com>,
	linux-mm@kvack.org, Dan Magenheimer <dan.magenheimer@oracle.com>
Subject: Re: behavior of zram stats, and zram allocation limit
Date: Wed, 20 Feb 2013 08:54:21 +0900	[thread overview]
Message-ID: <20130219235421.GC16950@blaptop> (raw)
In-Reply-To: <51204DB1.9000203@gmail.com>

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@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2013-02-19 23:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-21 22:58 behavior of zram stats, and zram allocation limit Luigi Semenzato
2012-11-22  0:46 ` Luigi Semenzato
2012-11-23  5:51 ` Minchan Kim
2012-11-23 16:45   ` Dan Magenheimer
2012-11-23 17:56     ` Luigi Semenzato
2013-02-17  3:25   ` Jaegeuk Hanse
2013-02-19 23:54     ` Minchan Kim [this message]
2013-02-17  3:01 ` Jaegeuk Hanse

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=20130219235421.GC16950@blaptop \
    --to=minchan@kernel.org \
    --cc=dan.magenheimer@oracle.com \
    --cc=jaegeuk.hanse@gmail.com \
    --cc=linux-mm@kvack.org \
    --cc=semenzato@google.com \
    /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.