From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH] xen/domctl: lower loglevel of XEN_DOMCTL_memory_mapping Date: Thu, 10 Sep 2015 20:59:20 -0400 Message-ID: <20150911005920.GD16994@konrad-lan.dumpdata.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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <55F22402.5020506@intel.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: "Chen, Tiejun" Cc: Keir Fraser , Ian Campbell , Tim Deegan , IanJackson , xen-devel@lists.xen.org, Jan Beulich , Malcolm Crossley List-Id: xen-devel@lists.xenproject.org On Fri, Sep 11, 2015 at 08:44:50AM +0800, Chen, Tiejun wrote: > >>Right, that's one of the things that would need taking care of. > >>(Whether enforcing an upper limit is actually needed I'm not > >>sure - we generally allow the admin to shoot himself in the foot > >>if he wants to. And whether the lower limit should be 64 instead > >>of just ensuring the limit is not zero is another question.) > > > >64 was semi-arbitrary - it ended up giving good latency on > >highly scalar machines (8 socket). Higher numbers ended up > >affecting the latency. > > > >But higher numbers on small socket machines were OK. > >(As they do not have 8 IOMMU VT-d chipsets all potentially > >flodding the QPI with serialized cache flushes). > >> > > So we should make this range [8, ] here, but 64 by > default. Right? Not sure I follow you. The 8 was based on 8 socket machines having 8 IOMMUs.. 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 > > Thanks > Tiejun >