[linux-mm-cc] [PATCH] module param size too big fix up

Nai Xia nai.xia at gmail.com
Mon Apr 28 05:36:00 EDT 2008


---------- Forwarded message ----------
From: Nai Xia <nai.xia at gmail.com>
Date: Mon, Apr 28, 2008 at 5:35 PM
Subject: Re: [linux-mm-cc] [PATCH] module param size too big fix up
To: John McCabe-Dansted <gmatht at gmail.com>


On Mon, Apr 28, 2008 at 5:18 PM, John McCabe-Dansted <gmatht at gmail.com> wrote:
 > On Mon, Apr 28, 2008 at 4:25 PM, <nai.xia at gmail.com> wrote:
 >
 > > hi, Nitin,
 > > I notice that when initializing compcache, if the compcache_size_kbytes is
 > given
 > > a very big value, the module will be loaded abnormally
 >
 > How big is very big? Last time I checked, compcache ran OK with up to 150%
 > ram, since this typically requires a bit under 75% of RAM when compressed.
 > This configuration may be useful when booting LiveCDs with very low ram.
 > E.g. the Ubuntu Hardy LiveCD installer will just run with 220MB of RAM if we
 > set compcache to 300MB.

 About 1000 times, since I used XXX bytes instead of XXX/1024 kbytes as param.
 :)



 >
 > > -- the block device will
 > > not appear and the module will refuse to unload. (I think you can easily
 > > reproduce it youself)
 >
 > Could we simply detect or recover from the abnormal load?

 Good suggestion.


 >
 > > This patch makes the user unable to use a value bigger than the system
 > RAM,
 >
 > If we take this approach, perhaps we could make this max cap at least 200%
 > of RAM. If we know memory is easily compressible then 200% is already
 > sensible for some situations. Once we implement swapping out to disk sizes
 > well in excess of 200% will be reasonably common. Would 1000% be
 > sufficiently small to avoid this problem?

 Hmm,,... Well, I think a reasonable up limit should be based on a wide
 range of workloads.
 The patch I posted was only a quick fix,
 It will be good if you have solid evidence of a safe up bound. :)

 Regards,
 Nai

 >
 > --


> John C. McCabe-Dansted
 > PhD Student
 > University of Western Australia


More information about the linux-mm-cc mailing list