From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH v3 4/7] sysctl: Add sysctl interface for querying PCI topology Date: Tue, 10 Feb 2015 16:30:35 +0000 Message-ID: <54DA322B02000078000C8167__1953.16443355313$1423585949$gmane$org@mail.emea.novell.com> References: <1423512275-6531-1-git-send-email-boris.ostrovsky@oracle.com> <1423512275-6531-5-git-send-email-boris.ostrovsky@oracle.com> <54D9E7DE.6080609@citrix.com> <54DA19A4.8070603@oracle.com> <54DA1BC1.2030205@citrix.com> <54DA1E6D.2010401@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54DA1E6D.2010401@oracle.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: boris.ostrovsky@oracle.com Cc: wei.liu2@citrix.com, ian.campbell@citrix.com, port-xen@netbsd.org, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, xen-devel@lists.xen.org, ufimtseva@gmail.com, keir@xen.org List-Id: xen-devel@lists.xenproject.org >>> Boris Ostrovsky 02/10/15 4:07 PM >>> >On 02/10/2015 09:54 AM, Andrew Cooper wrote: >> copy_to/from_guest() is not expensive. It is a straight memcpy with an >> extable guards for pagefaults. > >True, but still why do this inside a loop? xmalloc() of less than a page >is not that expensive, is it? > >(The downside is that when we have really lots of devices we may be >asking for more than one page. I know that we try not to do this but >again, I think the expense would be amortised over long loops.). And risk failing the hypercall because there isn't enough contiguous memory? And that perhaps only on really large systems where debugging may end up being difficult? No, please don't. Jan