[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 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?
Suppose you get an interrupt that re-enables IRQs in the middle (I
think we do this on occasion).  Then you get another interrupt that
reschedules illegally in the middle of the first one.

Something like if (__this_cpu_read(xen_in_preemptible_hcall) &&
!in_interrupt()) { along with a comment might do the trick.


Xen-devel mailing list



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