qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set si


From: Stefano Stabellini
Subject: Re: [Qemu-devel] [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set size.
Date: Wed, 3 Aug 2011 21:57:24 +0100
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

On Wed, 3 Aug 2011, Jan Beulich wrote:
> >>> Stefano Stabellini 08/03/11 12:01 AM >>> 
> >if (rlimit_as.rlim_max < MCACHE_MAX_SIZE) { 
> 
> This condition minimally needs to include what Anthony's original version had.

right


> >if (qemu is priviledged) { 
> >rlimit_as.rlim_max = RLIM_INFINITY; 
> >rlimit_as.rlim_cur = RLIM_INFINITY; 
> >} else { 
> >print a warning 
> >mapcache->max_mcache_size = rlimit_as.rlim_cur - NON_MCACHE_MEMORY_SIZE; 
> >rlimit_as.rlim_cur = rlimit_as.rlim_max; 
> >} 
> >} else { 
> 
> Not printing a warning here means that there are still cases where the
> fuzzy upper bound may not be precise enough anymore (hence causing
> silent failure). I think the privileged case needs to be handled without
> any other surrounding condition, and the warning ought to be prinited
> in any case in the non-privileged case.

good idea

> 
> >rlimit_as.rlim_cur = rlimit_as.rlim_max; 
> >} 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]