[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v3 4/7] sysctl: Add sysctl interface for querying PCI topology



On 10/02/15 16:30, Jan Beulich wrote:
>>>> Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> 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.

Indeed.  This hypercall is not part of a fastpath.  It can afford not to
amortise the cost in the name of making the code more simple and less
liable to fail.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.