From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: David Vrabel <david.vrabel@citrix.com>, xen-devel@lists.xenproject.org
Cc: "Luis R. Rodriguez" <mcgrof@suse.com>
Subject: Re: [PATCHv5] x86/xen: allow privcmd hypercalls to be preempted
Date: Thu, 05 Feb 2015 11:11:20 -0500 [thread overview]
Message-ID: <54D39628.4020508@oracle.com> (raw)
In-Reply-To: <1423140077-32356-1-git-send-email-david.vrabel@citrix.com>
On 02/05/2015 07:41 AM, David Vrabel wrote:
> +
> +void xen_maybe_preempt_hcall(void)
> +{
> + if (__this_cpu_read(xen_in_preemptible_hcall)) {
Can you check should_resched() here?
-boris
> + /*
> + * Clear flag as we may be rescheduled on a different
> + * cpu.
> + */
> + __this_cpu_write(xen_in_preemptible_hcall, false);
> + _cond_resched();
> + __this_cpu_write(xen_in_preemptible_hcall, true);
> + }
> +}
> +#endif /* CONFIG_PREEMPT */
>
next prev parent reply other threads:[~2015-02-05 16:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-05 12:41 [PATCHv5] x86/xen: allow privcmd hypercalls to be preempted David Vrabel
2015-02-05 15:37 ` Boris Ostrovsky
2015-02-05 15:39 ` David Vrabel
2015-02-05 16:11 ` Boris Ostrovsky [this message]
2015-02-05 16:14 ` David Vrabel
2015-02-05 16:16 ` Boris Ostrovsky
2015-02-05 18:14 ` Luis R. Rodriguez
2015-02-05 18:23 ` Andrew Cooper
2015-02-05 18:36 ` Luis R. Rodriguez
2015-02-06 0:50 ` Andy Lutomirski
2015-02-06 10:01 ` David Vrabel
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=54D39628.4020508@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=david.vrabel@citrix.com \
--cc=mcgrof@suse.com \
--cc=xen-devel@lists.xenproject.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.