All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <dario.faggioli@citrix.com>
To: Meng Xu <xumengpanda@gmail.com>
Cc: Chong Li <chong.li@wustl.edu>, Sisu Xi <xisisu@gmail.com>,
	George Dunlap <george.dunlap@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Meng Xu <mengxu@cis.upenn.edu>, Jan Beulich <JBeulich@suse.com>,
	Chong Li <lichong659@gmail.com>,
	Dagaen Golomb <dgolomb@seas.upenn.edu>
Subject: Re: [PATCH v3 for Xen 4.6 1/4] xen: enable per-VCPU parameter settings for RTDS scheduler
Date: Wed, 8 Jul 2015 10:33:54 +0200	[thread overview]
Message-ID: <1436344434.22672.186.camel@citrix.com> (raw)
In-Reply-To: <CAENZ-+=h8A6Nh3=FUMBZ1y4t3nZYfXG-pKMcwDB=971HQmROyQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 4691 bytes --]

On Tue, 2015-07-07 at 23:06 -0700, Meng Xu wrote:
> 2015-07-07 7:39 GMT-07:00 Dario Faggioli <dario.faggioli@citrix.com>:
> > On Tue, 2015-07-07 at 09:59 +0100, Jan Beulich wrote:
> >> >>> On 29.06.15 at 04:44, <lichong659@gmail.com> wrote:
> >> > --- a/xen/common/Makefile
> >> > +++ b/xen/common/Makefile
> >> > @@ -31,7 +31,6 @@ obj-y += rbtree.o
> >> >  obj-y += rcupdate.o
> >> >  obj-y += sched_credit.o
> >> >  obj-y += sched_credit2.o
> >> > -obj-y += sched_sedf.o
> >> >  obj-y += sched_arinc653.o
> >> >  obj-y += sched_rt.o
> >> >  obj-y += schedule.o
> >>
> >> Stray change. Or perhaps the file doesn't build anymore, in which case
> >> you should instead have stated that the patch is dependent upon the
> >> series removing SEDF.
> >>
> > This indeed does not belong in here. And of course, things should
> > build... So, Chong, either deal with SEDF as well, if basing your
> > patches on a tree where it is still there, or base on top of my patches,
> > ignore it, but state the dependency, as Jan is asking.
> >
> >> > @@ -1157,8 +1158,75 @@ rt_dom_cntl(
> >
> >> > +    case XEN_DOMCTL_SCHEDOP_putvcpuinfo:
> >> > +        spin_lock_irqsave(&prv->lock, flags);
> >> > +        for( index = 0; index < op->u.v.nr_vcpus; index++ )
> >> > +        {
> >> > +            if ( copy_from_guest_offset(&local_sched,
> >> > +                    op->u.v.vcpus, index, 1) )
> >> > +            {
> >> > +                rc = -EFAULT;
> >> > +                break;
> >> > +            }
> >> > +            if ( local_sched.vcpuid >= d->max_vcpus
> >> > +                    || d->vcpu[local_sched.vcpuid] == NULL )
> >> > +            {
> >> > +                rc = -EINVAL;
> >> > +                break;
> >> > +            }
> >> > +            svc = rt_vcpu(d->vcpu[local_sched.vcpuid]);
> >> > +            svc->period = MICROSECS(local_sched.s.rtds.period);
> >> > +            svc->budget = MICROSECS(local_sched.s.rtds.budget);
> >>
> >> Are all input values valid here?
> >>
> > That's a good point, actually. Right now, SEDF does some range
> > enforcement, by means of these values:
> >
> > #define PERIOD_MAX MILLISECS(10000) /* 10s  */
> > #define PERIOD_MIN (MICROSECS(10))  /* 10us */
> > #define SLICE_MIN (MICROSECS(5))    /*  5us */
> >
> > Chong, it probably makes sense to (in a separate patch), introduce
> > something like this in RTDS too (with SLICE_MIN-->BUDGET_MIN), and then
> > use them, in this patch, for sanity checking the input.
> >
> > It also makes sense to check and enforce budget<=period, IMO.
> >
> > About the specific values, I'm open to proposals. I think something like
> > the SEDF's one is fine. Meng?
> 
> We are trying to make some range enforcement for RTDS scheduler. Is my
> understanding correct? (It should be, but just in case. :-) )
> 
We are wondering whether that could be necessary/useful, and IMO, it
would.

> As to the range of period, I think the max value can be as large as
> the type of period (ie. s_time_t) can represent. When we want a
> dedicated CPU for a guest, we will set budget=period and  can set the
> period to a very very large value to avoid the unnecessarily
> invocation of the scheduler.
>
Makes sense. We do have STIME_MAX and, given that period is something
that is added to current time during scheduling, STIME_DELTA_MAX.

Maybe, put something together basing on those? 

> As to the min value of period, I think it should be >=100us. The
> scheduler overhead of running a large box could be 1us if the runq is
> long and competetion of the runq lock is heavy. If the scheduler is
> potentially invoked every 10us, the scheduler overhead will be 10% of
> total computation time, which seems a lot to me.
> 
Ok.

> As to the range of budget, the min value can be 5us, the same with
> SEDF; 
>
Well, wouldn't the above reasoning about overhead apply here too?
Budgets of 5us mean the scheduler can be invoked every 5us for budget
enforcement. If 10us was unreasonable, 5 is even more so.

Therefore, 100us here too? Or maybe let's allow for lower values (like
50us or 10us), but print a warning?

> the max value is the value of period of the same VCPU.
> 
Yep.

And, whatever the values, it would be useful to have comments somewhere
(either when the values are defined or enforced), stating what you said
above.

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2015-07-08  8:33 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29  2:44 [PATCH v3 for Xen 4.6 0/4] Enable per-VCPU parameter settings for RTDS scheduler Chong Li
2015-06-29  2:44 ` [PATCH v3 for Xen 4.6 1/4] xen: enable " Chong Li
2015-07-07  8:59   ` Jan Beulich
2015-07-07 14:39     ` Dario Faggioli
2015-07-08  6:06       ` Meng Xu
2015-07-08  8:33         ` Dario Faggioli [this message]
2015-07-09  1:16           ` Meng Xu
2015-07-10  9:51             ` Dario Faggioli
2015-07-07 14:55     ` Dario Faggioli
2015-07-07 16:09       ` Jan Beulich
2015-07-07 15:33     ` Chong Li
2015-07-07 15:41       ` Jan Beulich
2015-07-07 15:46       ` Dario Faggioli
2015-07-07 14:51   ` Dario Faggioli
2015-06-29  2:44 ` [PATCH v3 for Xen 4.6 2/4] libxc: " Chong Li
2015-06-30 12:22   ` Ian Campbell
2015-06-30 15:18     ` Chong Li
2015-06-30 15:32       ` Ian Campbell
2015-06-30 15:57         ` Chong Li
2015-06-30 16:04           ` Ian Campbell
2015-06-29  2:44 ` [PATCH v3 for Xen 4.6 3/4] libxl: " Chong Li
2015-06-30 12:26   ` Ian Campbell
2015-06-30 15:42     ` Chong Li
2015-06-30 15:57       ` Ian Campbell
2015-06-30 16:10         ` Chong Li
2015-06-30 16:19           ` Ian Campbell
2015-06-30 16:53             ` Chong Li
2015-07-01  0:54             ` Meng Xu
2015-07-01  8:48               ` Ian Campbell
2015-07-01 12:50                 ` Dario Faggioli
2015-07-01 16:59                   ` Chong Li
2015-07-07 16:23   ` Dario Faggioli
2015-07-08 14:35     ` Chong Li
2015-07-08 14:45       ` Dario Faggioli
2015-06-29  2:44 ` [PATCH v3 for Xen 4.6 4/4] xl: " Chong Li
2015-07-07 15:34   ` Dario Faggioli
2015-07-07 16:01     ` Chong Li
2015-07-07 15:16 ` [PATCH v3 for Xen 4.6 0/4] Enable " Dario Faggioli
2015-07-07 16:11   ` Chong Li

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=1436344434.22672.186.camel@citrix.com \
    --to=dario.faggioli@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=chong.li@wustl.edu \
    --cc=dgolomb@seas.upenn.edu \
    --cc=george.dunlap@eu.citrix.com \
    --cc=lichong659@gmail.com \
    --cc=mengxu@cis.upenn.edu \
    --cc=xen-devel@lists.xen.org \
    --cc=xisisu@gmail.com \
    --cc=xumengpanda@gmail.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.