From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave McCracken Subject: Re: [PATCH] Add hypercall to mark superpages to improve performance Date: Fri, 30 Apr 2010 16:43:01 -0500 Message-ID: <201004301643.01580.dcm@mccr.org> References: Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: Jeremy Fitzhardinge , Xen Developers List List-Id: xen-devel@lists.xenproject.org On Friday 30 April 2010, Keir Fraser wrote: > One option would be an array of reference counts indexed by superpage > number (i.e, mfn>>9). So kind of a separate array to page_info, and a > non-zero superpage refcount would arrange to hold a reference on every > relevant page in page_info. > > That could be implemented with no extra hypercalls, and I reckon it's > probably easier to make this race-free too. Obviously it does have extra > code complexity to construct this array (which I suppose needs to be > sparse, just like page_info array, in the face of very sparse memory > maps). The space overhead (about 8 bytes per 2MB, or 0.0004% of total > system memory) would be trivial. Compared with an extra reference count in > every page_info, which would have a much higher 0.2% overhead. I like this idea. I'll look into it. Dave