From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [PATCH] xen/domctl: lower loglevel of XEN_DOMCTL_memory_mapping Date: Thu, 10 Sep 2015 13:28:32 +0800 Message-ID: <55F11500.10909@intel.com> References: <1441781425-11553-1-git-send-email-tiejun.chen@intel.com> <20150909142018.GA28134@l.oracle.com> <55F05F7002000078000A15B9@prv-mh.provo.novell.com> <20150909145013.GH28134@l.oracle.com> <55F04E1A.6070202@citrix.com> <55F0700B02000078000A1658@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <55F0700B02000078000A1658@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 , Malcolm Crossley Cc: Keir Fraser , Ian Campbell , IanJackson , Tim Deegan , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >> If the 64 limit was arbitrary then I would suggest increasing it to at least >> 1024 so that >> at least 4M of BAR can be mapped in one go and it reduces the overhead by a >> factor of 16. > > 1024 may be a little much, but 256 is certainly a possibility, plus > Konrad's suggestion to allow this limit to be controlled via command > line option. Are you guys talking this way? diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 3946e4c..a9671bb 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -88,6 +88,10 @@ boolean_param("noapic", skip_ioapic_setup); s8 __read_mostly xen_cpuidle = -1; boolean_param("cpuidle", xen_cpuidle); +/* once_mapping_mfns: memory mapping mfn bumbers once. */ +unsigned int xen_once_mapping_mfns; +integer_param("once_mapping_mfns", xen_once_mapping_mfns); + #ifndef NDEBUG unsigned long __initdata highmem_start; size_param("highmem-start", highmem_start); diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 3bf39f1..82c85e3 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -33,6 +33,8 @@ #include #include +extern unsigned int xen_once_mapping_mfns; + static DEFINE_SPINLOCK(domctl_lock); DEFINE_SPINLOCK(vcpu_alloc_lock); @@ -1035,7 +1037,7 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) ret = -E2BIG; /* Must break hypercall up as this could take a while. */ - if ( nr_mfns > 64 ) + if ( nr_mfns > xen_once_mapping_mfns ) break; ret = -EPERM; Thanks Tiejun