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

John McCabe-Dansted gmatht at gmail.com
Mon Apr 28 05:18:51 EDT 2008


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.


> -- 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?


> 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?

-- 
John C. McCabe-Dansted
PhD Student
University of Western Australia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/linux-mm-cc/attachments/20080428/fbdfc90f/attachment.htm 


More information about the linux-mm-cc mailing list