From: "Jan Beulich" Subject: Re: Xen x86 host memory limit issues Date: Mon, 24 Aug 2015 05:47:32 -0600 Message-ID: <55DB2074020000780009CAC2@prv-mh.provo.novell.com> References: <55DAF3C2.5020905@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55DAF3C2.5020905@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: George Dunlap , Elena Ufimtseva , Tim Deegan , Juergen Gross , Xen-devel List List-Id: xen-devel@lists.xenproject.org >>> On 24.08.15 at 12:36, wrote: > The infrastructure around xenheap_max_mfn() is supposed cause all > xenheap page allocations to fall within the Xen direct mapped region, > but experimentally doesn't work correctly. > > In all cases I have seen, the bad xenheap allocations have been from > calls which contain numa information in the memflags, which leads me to > suspect it is an interaction issue of numa hinting information and > xenheap_bits. At a guess I suspect alloc_heap_pages() doesn't correctly > override the numa hint when both a numa hint and zone limit are > provided, but I have not investigated this yet. But you're in the ideal position to do so. As said previously on the same topic, looking just at the code I can't see what's wrong, even when taking into account the experimentally observed behavior. > Fixing that bug will be a useful step, as it will allow Xen to function > with host ram above the direct map limit, but is still not an optimal > solution as it prevents getting numa-local xenheap memory. > > Longterm it would be optimal to segment the direct map region by numa > node so there is equal quantities of xenheap memory available from each > numa node. Yes, albeit I'm suspecting there to arise (at least theoretical) issues on systems with many nodes - the per-node ranges directly mapped may become unreasonably small (and we may risk exhausting node 0's memory due to not NUMA-tagged allocation requests). Jan