[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH][RESEND] Fix xm sched-sedf command to show a error message



On Mon, Feb 26, 2007 at 07:08:29PM +0900, Masaki Kanno wrote:

Content-Description: Mail message body
> Hi,
> 
> I resend the patch to solve the issue that I reported as follows. 
> 
> http://lists.xensource.com/archives/html/xen-devel/2007-02/msg00760.html
> 
> 
> The behavior of the xm sched-sedf command isn't the specification, 
> is it?  If it is specification, I withdraw the patch. 
> Could you possibly comment or apply the patch? 
> 
> Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Thanks Kan.  I've taken the patch to schedule.c -- Keir says that the rest is
unnecessary.

Cheers,

Ewan.


> 
> Best regards,
>  Kan
> 

> diff -r 2c3a13993b0d xen/common/sched_credit.c
> --- a/xen/common/sched_credit.c       Fri Feb 23 14:44:07 2007 +0000
> +++ b/xen/common/sched_credit.c       Mon Feb 19 14:05:49 2007 +0900
> @@ -695,7 +695,7 @@ csched_vcpu_wake(struct vcpu *vc)
>      __runq_tickle(cpu, svc);
>  }
>  
> -static int
> +static long
>  csched_dom_cntl(
>      struct domain *d,
>      struct xen_domctl_scheduler_op *op)
> diff -r 2c3a13993b0d xen/common/sched_sedf.c
> --- a/xen/common/sched_sedf.c Fri Feb 23 14:44:07 2007 +0000
> +++ b/xen/common/sched_sedf.c Mon Feb 26 09:59:51 2007 +0900
> @@ -1353,7 +1353,7 @@ static int sedf_adjust_weights(struct xe
>  
>  
>  /* set or fetch domain scheduling parameters */
> -static int sedf_adjust(struct domain *p, struct xen_domctl_scheduler_op *op)
> +static long sedf_adjust(struct domain *p, struct xen_domctl_scheduler_op *op)
>  {
>      struct vcpu *v;
>  
> diff -r 2c3a13993b0d xen/common/schedule.c
> --- a/xen/common/schedule.c   Fri Feb 23 14:44:07 2007 +0000
> +++ b/xen/common/schedule.c   Mon Feb 19 14:08:16 2007 +0900
> @@ -497,6 +497,7 @@ long sched_adjust(struct domain *d, stru
>  long sched_adjust(struct domain *d, struct xen_domctl_scheduler_op *op)
>  {
>      struct vcpu *v;
> +    long ret;
>      
>      if ( (op->sched_id != ops.sched_id) ||
>           ((op->cmd != XEN_DOMCTL_SCHEDOP_putinfo) &&
> @@ -525,8 +526,8 @@ long sched_adjust(struct domain *d, stru
>      if ( d == current->domain )
>          vcpu_schedule_lock_irq(current);
>  
> -    SCHED_OP(adjust, d, op);
> -    TRACE_1D(TRC_SCHED_ADJDOM, d->domain_id);
> +    if ( (ret = SCHED_OP(adjust, d, op)) == 0 )
> +        TRACE_1D(TRC_SCHED_ADJDOM, d->domain_id);
>  
>      if ( d == current->domain )
>          vcpu_schedule_unlock_irq(current);
> @@ -537,7 +538,7 @@ long sched_adjust(struct domain *d, stru
>              vcpu_unpause(v);
>      }
>  
> -    return 0;
> +    return ret;
>  }
>  
>  /* 
> diff -r 2c3a13993b0d xen/include/xen/sched-if.h
> --- a/xen/include/xen/sched-if.h      Fri Feb 23 14:44:07 2007 +0000
> +++ b/xen/include/xen/sched-if.h      Mon Feb 19 14:05:49 2007 +0900
> @@ -75,7 +75,7 @@ struct scheduler {
>      struct task_slice (*do_schedule) (s_time_t);
>  
>      int          (*pick_cpu)       (struct vcpu *);
> -    int          (*adjust)         (struct domain *,
> +    long         (*adjust)         (struct domain *,
>                                      struct xen_domctl_scheduler_op *);
>      void         (*dump_settings)  (void);
>      void         (*dump_cpu_state) (int);

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.