Re: [Xen-devel] [PATCH 04/24] xen: credit2: properly schedule migration of a running vcpu.

2016-09-12 Thread George Dunlap
On 17/08/16 18:18, Dario Faggioli wrote:
> If wanting to migrate a vcpu that is actually running,
> we need to ask the scheduler to chime in as soon as
> possible, to have the vcpu itself stopped and actually
> moved.
> 
> Make sure this happens by, after setting all the relevant
> flags, raising the scheduler softirq.
> 
> Signed-off-by: Dario Faggioli 

Acked-by: George Dunlap 

> ---
> Cc: George Dunlap 
> Cc: Anshul Makkar 
> ---
>  xen/common/sched_credit2.c |1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
> index a5a744f..12dfd20 100644
> --- a/xen/common/sched_credit2.c
> +++ b/xen/common/sched_credit2.c
> @@ -1667,6 +1667,7 @@ static void migrate(const struct scheduler *ops,
>  svc->migrate_rqd = trqd;
>  __set_bit(_VPF_migrating, >vcpu->pause_flags);
>  __set_bit(__CSFLAG_runq_migrate_request, >flags);
> +cpu_raise_softirq(svc->vcpu->processor, SCHEDULE_SOFTIRQ);
>  SCHED_STAT_CRANK(migrate_requested);
>  }
>  else
> 


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel


[Xen-devel] [PATCH 04/24] xen: credit2: properly schedule migration of a running vcpu.

2016-08-17 Thread Dario Faggioli
If wanting to migrate a vcpu that is actually running,
we need to ask the scheduler to chime in as soon as
possible, to have the vcpu itself stopped and actually
moved.

Make sure this happens by, after setting all the relevant
flags, raising the scheduler softirq.

Signed-off-by: Dario Faggioli 
---
Cc: George Dunlap 
Cc: Anshul Makkar 
---
 xen/common/sched_credit2.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c
index a5a744f..12dfd20 100644
--- a/xen/common/sched_credit2.c
+++ b/xen/common/sched_credit2.c
@@ -1667,6 +1667,7 @@ static void migrate(const struct scheduler *ops,
 svc->migrate_rqd = trqd;
 __set_bit(_VPF_migrating, >vcpu->pause_flags);
 __set_bit(__CSFLAG_runq_migrate_request, >flags);
+cpu_raise_softirq(svc->vcpu->processor, SCHEDULE_SOFTIRQ);
 SCHED_STAT_CRANK(migrate_requested);
 }
 else


___
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel