From: "Jan Beulich" Subject: Re: [PATCH] xen/tmem: Don't use map_domain_page for long-life-time pages. Date: Thu, 13 Jun 2013 15:04:46 +0100 Message-ID: <51B9ED9E02000078000DDF02@nat28.tlf.novell.com> References: <1371127820-23294-1-git-send-email-konrad.wilk@oracle.com> <51B9C7FB.6000903@eu.citrix.com> <51B9E9ED02000078000DDEC4@nat28.tlf.novell.com> <1371131752.24512.541.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1371131752.24512.541.camel@zakaz.uk.xensource.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: Ian Campbell Cc: Dan Magenheimer , xen-devel@lists.xensource.com, Konrad Rzeszutek Wilk , George Dunlap , Konrad Rzeszutek Wilk , Bob Liu , keir.xen@gmail.com List-Id: xen-devel@lists.xenproject.org >>> On 13.06.13 at 15:55, Ian Campbell wrote: > On Thu, 2013-06-13 at 14:49 +0100, Jan Beulich wrote: >> >>> On 13.06.13 at 15:24, George Dunlap wrote: >> > Did I understand correctly that the map_domain_page() was required on >> > >5TiB systems, presumably because of limited virtual address space? In >> > which case this code will fail on those systems? >> > >> > If that is the case, then we need to have a way to make sure tmem cannot >> > be enabled on such systems. >> >> Tmem is full of assumptions that all memory is mapped, and hence >> one of the requirements here was to disable tmem when that >> assumption is not true (until eventually tmem would get fixed). > > Isn't this change moving it further away from that fixed state though? In a way, yes. But what do you do? The code already assumes it can use mfn_to_virt() or alike on memory taken from alloc_domheap_pages(), so it's just being made consistently wrong in doing it one more time. Any alternative fix would be way more involved, as it would require adding the (un-)mapping around the actual use points of the memory. Jan