From: Keir Fraser Subject: Re: Tmem vs order>0 allocation, workaround RFC Date: Mon, 15 Feb 2010 08:21:18 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" 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: Dan Magenheimer , "xen-devel@lists.xensource.com" , Jan Beulich Cc: George Dunlap , "kurt.hackel@oracle.com" , Ian Pratt , Tim Deegan , Patrick Colp , Grzegorz Milos , Andrew Peace List-Id: xen-devel@lists.xenproject.org On 12/02/2010 17:24, "Dan Magenheimer" wrote: > I just had an idea for a workaround that might be low enough > impact to get in for 4.0 and allow tmem to be enabled by > default. I think it will not eliminate the fragmentation > problem entirely, but would greatly reduce the probability > of it causing problems for domain creation/migration when tmem > is enabled, and possibly for the other memory utilization > features as well. > > Simply, avail_heap_pages would fail if total_avail_pages > is less than 1%(?) of the total memory on the system AND > the request is order==0. Essentially, this is reserving > a "zone" for order>0 allocations. I don't see how that necessarily works. Pages can be allocated in order>0 chunks and freed order==0, so even that last 1% can get fragmented. For example, guests get their memory allocated in 2MB chunks where possible; but their balloon drivers may then free arbitrary 4kB pages within those chunks. -- Keir