From: Ian Campbell Subject: Re: [PATCH V5] xen/privcmd.c: improve performance of MMAPBATCH_V2. Date: Thu, 20 Dec 2012 11:26:40 +0000 Message-ID: <1356002800.26722.49.camel@zakaz.uk.xensource.com> References: <1355943187-4167-1-git-send-email-mats.petersson@citrix.com> <1356000020.26722.39.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: <1356000020.26722.39.camel@zakaz.uk.xensource.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: Mats Petersson Cc: "xen-devel@lists.xensource.com" , "mats@planetcatfish.com" , Andres Lagar-Cavilla , "JBeulich@suse.com" , "konrad@darnok.org" , David Vrabel List-Id: xen-devel@lists.xenproject.org On Thu, 2012-12-20 at 10:40 +0000, Ian Campbell wrote: > I've added Andres since I think this accumulation of ENOENT in err_ptr > is a paging related thing, or at least I think he understands this > code ;-) > > > @@ -89,37 +89,112 @@ static int remap_pte_fn(pte_t *ptep, pgtable_t token, unsigned long addr, > > struct page *page = info->pages[info->index++]; > > unsigned long pfn = page_to_pfn(page); > > pte_t pte = pfn_pte(pfn, info->prot); > > - > > - if (map_foreign_page(pfn, info->fgmfn, info->domid)) > > - return -EFAULT; > > + int err; > > + // TODO: We should really batch these updates. This just made me realise that we need a way for XENMEM_add_to_physmap_range to return errors for each slot. I'll look into that in the new year. Ian.