From mboxrd@z Thu Jan 1 00:00:00 1970 From: Boris Ostrovsky Subject: Re: [PATCHv5] x86/xen: allow privcmd hypercalls to be preempted Date: Thu, 05 Feb 2015 11:16:47 -0500 Message-ID: <54D3976F.9070304@oracle.com> References: <1423140077-32356-1-git-send-email-david.vrabel@citrix.com> <54D39628.4020508@oracle.com> <54D396C9.7070404@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YJP7Y-000693-9h for xen-devel@lists.xenproject.org; Thu, 05 Feb 2015 16:17:36 +0000 In-Reply-To: <54D396C9.7070404@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel , xen-devel@lists.xenproject.org Cc: "Luis R. Rodriguez" List-Id: xen-devel@lists.xenproject.org On 02/05/2015 11:14 AM, David Vrabel wrote: > On 05/02/15 16:11, Boris Ostrovsky wrote: >> 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? > _cond_resched() already does this. > Right, you'd be checking it twice, but since in most cases you won't need to reschedule you will then avoid making unnecessary call (and per-cpu updates). -boris