All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emmanuel Ackaouy <ack@xensource.com>
To: "Tian, Kevin" <kevin.tian@intel.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH] trivial fix for vcpu_set_affinity
Date: Thu, 11 Jan 2007 10:49:05 +0100	[thread overview]
Message-ID: <1a798491af4edfaf3abb72d214a01d15@xensource.com> (raw)
In-Reply-To: <D470B4E54465E3469E2ABBC5AFAC390F9E1074@pdsmsx412.ccr.corp.intel.com>

I don't get it.

If you don't at least call vcpu_sleep_nosync() on the current context
when it changes affinity, how do you initiate a reschedule event?

What's wrong with the code as is?

On Jan 11, 2007, at 9:42, Tian, Kevin wrote:

> No need to try migration in current context since self migrate
> will be handled by next vcpu after context switch.
>
> Signed-off-by Kevin Tian <kevin.tian@intel.com>
>
> diff -r e66f047bc97e xen/common/schedule.c
> --- a/xen/common/schedule.c	Tue Jan 09 18:56:44 2007 -0800
> +++ b/xen/common/schedule.c	Thu Jan 11 16:31:37 2007 +0800
> @@ -243,7 +243,7 @@ int vcpu_set_affinity(struct vcpu *v, cp
>
>      vcpu_schedule_unlock_irqrestore(v, flags);
>
> -    if ( test_bit(_VCPUF_migrating, &v->vcpu_flags) )
> +    if ( (v != current) && test_bit(_VCPUF_migrating, &v->vcpu_flags) 
> )
>      {
>          vcpu_sleep_nosync(v);
>          vcpu_migrate(v);
>
> Thanks,
> Kevin
> <set_affinity.patch>_______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

  parent reply	other threads:[~2007-01-11  9:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-11  8:42 [PATCH] trivial fix for vcpu_set_affinity Tian, Kevin
2007-01-11  9:43 ` Keir Fraser
2007-01-11  9:53   ` Tian, Kevin
2007-01-11  9:49 ` Emmanuel Ackaouy [this message]
2007-01-11  9:57   ` Tian, Kevin

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=1a798491af4edfaf3abb72d214a01d15@xensource.com \
    --to=ack@xensource.com \
    --cc=kevin.tian@intel.com \
    --cc=xen-devel@lists.xensource.com \
    /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.