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

Re: [Xen-devel] [PATCH 3/3] xen/events: schedule if the interrupted task is in a preemptible hypercall



>>> On 12.02.14 at 13:54, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:
> On 12/02/14 11:59, Jan Beulich wrote:
>>>>> On 11.02.14 at 20:19, David Vrabel <david.vrabel@xxxxxxxxxx> wrote:
>>> --- a/drivers/xen/events/events_base.c
>>> +++ b/drivers/xen/events/events_base.c
>>> @@ -1254,6 +1254,12 @@ void xen_evtchn_do_upcall(struct pt_regs *regs)
>>>  
>>>     irq_exit();
>>>     set_irq_regs(old_regs);
>>> +
>>> +#ifndef CONFIG_PREEMPT
>>> +   if ( __this_cpu_read(xed_nesting_count) == 0
>>> +        && is_preemptible_hypercall(regs) )
>>> +           _cond_resched();
>>> +#endif
>> 
>> I don't think this can be done here - a 64-bit x86 kernel would
>> generally be on the IRQ stack, and I don't think scheduling
>> should be done in this state.
> 
> _cond_resched() doesn't look that different from preempt_schedule_irq()
> which is explicitly callable from irq context.

But IRQ context and running on the IRQ stack isn't the same. All
current callers of that function are in assembly code, where one
would hope people know what they're doing (and in particular
_when_ they do so).

Jan


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