All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@eu.citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>,
	Julien Grall <julien.grall@linaro.org>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Anup Patel <anup.patel@linaro.org>,
	Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
Subject: Re: [PATCH 2/2] xen/arm: call vcpu_yield on WFE trap
Date: Wed, 23 Jul 2014 14:29:06 +0100	[thread overview]
Message-ID: <53CFB8A2.3050308@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1407231412010.2293@kaball.uk.xensource.com>

On 07/23/2014 02:13 PM, Stefano Stabellini wrote:
> On Wed, 23 Jul 2014, George Dunlap wrote:
>> On Wed, Jul 23, 2014 at 1:05 PM, Stefano Stabellini
>> <stefano.stabellini@eu.citrix.com> wrote:
>>> No need to call vcpu_force_reschedule, is too expensive.
>>>
>>> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>>> ---
>>>   xen/arch/arm/traps.c |    2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c
>>> index 3dfabd0..8cd06cc 100644
>>> --- a/xen/arch/arm/traps.c
>>> +++ b/xen/arch/arm/traps.c
>>> @@ -1805,7 +1805,7 @@ asmlinkage void do_trap_hypervisor(struct cpu_user_regs *regs)
>>>           }
>>>           if ( hsr.wfi_wfe.ti ) {
>>>               /* Yield the VCPU for WFE */
>>> -            vcpu_force_reschedule(current);
>>> +            vcpu_yield(current);
>> Actually, sorry -- why are you wanting to yield here?
>>
>> At the moment "yield" is only initiated by the guest itself, and the
>> individual schedulers are notified that the guest has called "yield".
>> If what you want to do is yield for some other reason, it might be
>> better to have a slightly separate path for that.
>   
> It is a very similar situation: WFE means "wait for event" and it is
> used in the implementation of spin_locks, for example.
> I think that trapping the instruction and yielding is what we want.

Right -- sounds good then.

  -George

      reply	other threads:[~2014-07-23 13:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-23 12:04 [PATCH 0/2] xen/arm: vcpu_yield on WFE Stefano Stabellini
2014-07-23 12:05 ` [PATCH 1/2] xen: export do_yield as vcpu_yield Stefano Stabellini
2014-07-23 12:14   ` Ian Campbell
2014-07-23 12:58   ` George Dunlap
2014-07-23 13:04     ` Stefano Stabellini
2014-07-23 13:07       ` George Dunlap
2014-07-23 12:05 ` [PATCH 2/2] xen/arm: call vcpu_yield on WFE trap Stefano Stabellini
2014-07-23 13:11   ` George Dunlap
2014-07-23 13:13     ` Stefano Stabellini
2014-07-23 13:29       ` George Dunlap [this message]

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=53CFB8A2.3050308@eu.citrix.com \
    --to=george.dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=anup.patel@linaro.org \
    --cc=julien.grall@linaro.org \
    --cc=pranavkumar@linaro.org \
    --cc=stefano.stabellini@eu.citrix.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.