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

Re: [Xen-devel] [PATCHv5] x86/xen: allow privcmd hypercalls to be preempted



On 06/02/15 00:50, Andy Lutomirski wrote:
> On Thu, Feb 5, 2015 at 4:41 AM, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:
>> Hypercalls submitted by user space tools via the privcmd driver can
>> take a long time (potentially many 10s of seconds) if the hypercall
>> has many sub-operations.
>>
> 
>> +
>> +void xen_maybe_preempt_hcall(void)
> 
> I think this should be asmlinkage __visible.  Other than that, this
> looks good to me.  I like your solution to the tracking problem.
> 
>> +{
>> +       if (__this_cpu_read(xen_in_preemptible_hcall)) {
> 
> Hmm.  That being said, is there any issue with nested interrupts?

The should_resched() check in _cond_resched() already handles this
because irq_enter() sets the preempt count as non-zero.

FWIW, XenServer has been using something like this in production for
about a year without any problems.

David


_______________________________________________
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®.