WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set size.

To: Jan Beulich <jbeulich@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH] xen-mapcache: Fix rlimit set size.
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Wed, 3 Aug 2011 21:57:24 +0100
Cc: Anthony Perard <anthony.perard@xxxxxxxxxx>, "agraf@xxxxxxx" <agraf@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "qemu-devel@xxxxxxxxxx" <qemu-devel@xxxxxxxxxx>, Stefano Stabellini <Stefano.Stabellini@xxxxxxxxxxxxx>
Delivery-date: Wed, 03 Aug 2011 13:51:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4E396C590200007800073F3D@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4E396C590200007800073F3D@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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; 
> >} 

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel