All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: David Vrabel <david.vrabel@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	xen-devel@lists.xen.org,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH 3/3] xen/events: schedule if the interrupted task is in a preemptible hypercall
Date: Wed, 12 Feb 2014 11:59:46 +0000	[thread overview]
Message-ID: <52FB7042020000780011BAD0@nat28.tlf.novell.com> (raw)
In-Reply-To: <1392146352-16381-4-git-send-email-david.vrabel@citrix.com>

>>> On 11.02.14 at 20:19, David Vrabel <david.vrabel@citrix.com> 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.

Jan

  reply	other threads:[~2014-02-12 11:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 19:19 [PATCHv1 0/3]: xen: voluntary preemption for privcmd hypercalls David Vrabel
2014-02-11 19:19 ` [PATCH 1/3] x86/xen: allow for privcmd hypercalls to be preempted David Vrabel
2014-02-12  9:38   ` Ian Campbell
2014-02-12 10:10     ` Andrew Cooper
2014-02-12 10:18       ` Ian Campbell
2014-02-11 19:19 ` [PATCH 2/3] arm/xen: add stub is_preemptible_hypercall() David Vrabel
2014-02-11 19:19 ` [PATCH 3/3] xen/events: schedule if the interrupted task is in a preemptible hypercall David Vrabel
2014-02-12 11:59   ` Jan Beulich [this message]
2014-02-12 12:54     ` David Vrabel
2014-02-12 13:56       ` Jan Beulich
2014-02-12 16:35         ` David Vrabel
2014-02-12 16:47           ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52FB7042020000780011BAD0@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=david.vrabel@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.