From mboxrd@z Thu Jan 1 00:00:00 1970 From: Malcolm Crossley Subject: Re: [PATCH] xen/domctl: lower loglevel of XEN_DOMCTL_memory_mapping Date: Fri, 11 Sep 2015 11:28:08 +0100 Message-ID: <55F2ACB8.80203@citrix.com> References: <55F05F7002000078000A15B9@prv-mh.provo.novell.com> <20150909145013.GH28134@l.oracle.com> <55F04E1A.6070202@citrix.com> <55F0700B02000078000A1658@prv-mh.provo.novell.com> <55F11500.10909@intel.com> <55F157D602000078000A18C4@prv-mh.provo.novell.com> <55F1457C.5000708@intel.com> <55F1628502000078000A190B@prv-mh.provo.novell.com> <20150910175557.GG1216@x230.dumpdata.com> <55F22402.5020506@intel.com> <20150911005920.GD16994@konrad-lan.dumpdata.com> <55F2B83302000078000A2036@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55F2B83302000078000A2036@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , Tiejun Chen , Konrad Rzeszutek Wilk Cc: Keir Fraser , Tim Deegan , IanJackson , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 11/09/15 10:17, Jan Beulich wrote: >>>> On 11.09.15 at 02:59, wrote: >> If you want a formula I would do: >> >> #define MAX_SOCKETS 8 >> >> max_pfns = pow(2,(MAX_SOCKETS - (max(nr_iommus(), MAX_SOCKETS)))) * 64; >> >> Where nr_iommus would have to be somehow implemented, ditto for pow. >> >> This should give you: >> 8 -> 64 >> 7 -> 128 >> 6 -> 256 >> 5 -> 512 >> 4 -> 1024 >> 3 -> 2048 >> 2 -> 4096 >> 1 -> 16384 > > 16k seems excessive as a default. Also - why would this be related > to the number of sockets? I don't think there's a one-IOMMU-per- > socket rule; fixed-number-of-IOMMUs-per-node might come closer, > but there we'd have the problem of what "fixed number" is. Wouldn't > something as simple as 1024 / nr_iommus() do? > > I also don't follow what cache flushes you talked about earlier: I > don't think the IOMMUs drive any global cache flushes, and I > would have thought the size limited IOTLB and (CPU side) cache > ones should be pretty limited in terms of bus load (unless the TLB > ones would get converted to global ones due to lacking IOMMU > capabilities). Is that not the case? The data cache flushes are caused by the memory_type_changed() call at the bottom of the XEN_DOMCTL_memory_mapping hypercall, not by the IOMMU code itself. Malcolm > > Jan >