Re: [Xen-devel] [PATCH v6 00/16] xen: common: rbtree: ported updates from Linux tree

2017-12-07 Thread Dario Faggioli
week. BTW, can you update my email address to raist...@linux.it ? Regards, Dario -- <> (Raistlin Majere) ----- Dario Faggioli, Ph.D, http://about.me/dario.faggioli signature.asc Description: This is a dig

Re: [Xen-devel] [RFC PATCH v4] xen: credit2: provide custom option to create runqueue

2017-12-07 Thread Dario Faggioli
On Tue, 2017-12-05 at 21:58 +0530, Praveen Kumar wrote: > On Tue, Sep 5, 2017 at 11:26 PM, Dario Faggioli > wrote: > > > > I'm asking because I do have it half done myself, and it would not > > take > > too much time to me to finish it. > > > > I

Re: [Xen-devel] [PATCH v2 07/48] xen/sched: move per cpu scheduler private data into struct sched_resource

2019-09-09 Thread Dario Faggioli
> > - Passing the "urgent" indicator via parameter to idle (you didn't > >like that) > > > > - Make urgent_count a plain percpu variable > > Named sched_urgent_count or some such, this latter option doesn&#x

Re: [Xen-devel] dom0less + sched=null => broken in staging

2019-09-11 Thread Dario Faggioli
On Fri, 2019-08-23 at 18:16 -0700, Stefano Stabellini wrote: > On Wed, 21 Aug 2019, Dario Faggioli wrote: > > > > Hey, Stefano, Julien, > > > > Here's another patch. > > > > Rather than a debug patch, this is rather an actual "proposed > >

Re: [Xen-devel] [PATCH v2 08/48] xen/sched: switch vcpu_schedule_lock to unit_schedule_lock

2019-09-11 Thread Dario Faggioli
k it's worth to do it right now, out of concerns of potential scalability issues for socket-scheduling. We're discussing about merging core-scheduling, but keeping it disabled for now. We're not even sure if/when people will start to use *it*. I currently don't see much use ca

Re: [Xen-devel] [PATCH v2 20/48] xen: let vcpu_create() select processor

2019-09-11 Thread Dario Faggioli
t; > > > Given the response on an earlier similar question, I don't suppose > > I could talk you into dropping the sched_ prefix here? > > I like it better with prefix. Any opinions by the scheduler > maintainers? > I do like it with prefix better too.

Re: [Xen-devel] [PATCH v2 28/48] xen/sched: move struct task_slice into struct sched_unit

2019-09-12 Thread Dario Faggioli
next_slice.time); > -trace_continue_running(next->vcpu_list); > -return continue_running(prev->vcpu_list); > + prev->next_time); > } > Mmm... I'm sorry, but I'm not sure I understand what is going on here. Do you mind explai

Re: [Xen-devel] [PATCH v3 4/4] xen/sched: switch to debugtrace in cpupool handling

2019-09-12 Thread Dario Faggioli
On Mon, 2019-09-09 at 11:33 +0200, Juergen Gross wrote: > Instead of having a cpupool_dprintk() define just use debugtrace. > > Signed-off-by: Juergen Gross > Acked-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engine

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-12 Thread Dario Faggioli
+return runnable; > > +} > > Especially for understanding the (correctness of the) credit1 > changes it would be rather helpful if once again this function > actually iterated over all vCPU-s right away (even if there's > only one per unit right now), to see

Re: [Xen-devel] [PATCH v2 30/48] xen/sched: introduce unit_runnable_state()

2019-09-12 Thread Dario Faggioli
ically introducing no functional (or at least behavioral) change, is this right too? - can you provide some more detail about the race. When/how it occurs and how the changes done in credit and rt fix it? Thanks and Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggi

Re: [Xen-devel] RFC: Criteria for checking in core scheduling series

2019-09-12 Thread Dario Faggioli
;t > > have time to review the series). > > Ok. I'm back from vacation and am now looking at the patches. I am traveling next week, but I hope to be able to continue reviewing during that. > > No decisions are official until discussed on xen-devel; so the > > decision

Re: [Xen-devel] [PATCH v3 1/4] xen/sched: populate cpupool0 only after all cpus are up

2019-09-13 Thread Dario Faggioli
arlier, so > do that just before assigning the cpus. Initialize free cpus with all > online cpus at that time in order to be able to add the cpu notifier > late, too. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about

Re: [Xen-devel] [PATCH v3 2/4] xen/sched: remove cpu from pool0 before removing it

2019-09-13 Thread Dario Faggioli
. Is this anything that you've seen or that you can reproduce? Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --- <> (Rai

Re: [Xen-devel] [PATCH v2] xen/sched: rework and rename vcpu_force_reschedule()

2019-09-17 Thread Dario Faggioli
or Linux, but I think this is the case for FreeBSD too. So, even if the patch would have a negative impact (which again I don't think it's the case), we probably won't see them. On this grounds (and, of course, on the one that I've looked at the code, and think it's corre

Re: [Xen-devel] [PATCH v3 00/47] xen: add core scheduling support

2019-09-24 Thread Dario Faggioli
s with core-scheduling actually enabled. With these patches applied, but cpu-scheduling selected at boot, fully idle cores are still preferred, and the vCPUs will still be spread among them (as soon as there's any available). Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtua

Re: [Xen-devel] [PATCH v4 2/4] xen/sched: remove cpu from pool0 before removing it

2019-09-24 Thread Dario Faggioli
ILED case from cpu_schedule_callback(). > > Note that we are calling now schedule_cpu_switch() in stop_machine > context so we need to switch from spinlock_irq to spinlock_irqsave. > > Signed-off-by: Juergen Gross > --- > V2: rename cpupool_unassign_cpu_[epi|pro]logue() (Dario

Re: [Xen-devel] [PATCH v3 07/47] xen/sched: move per cpu scheduler private data into struct sched_resource

2019-09-24 Thread Dario Faggioli
>curr) > > > > By moving this a few lines down if could become an inline function > > as it seems, if (see above) its use as an lvalue is not intended. > > I like that idea. Will change to inline function. > Yes, definitely better. With this (turning to inline fun

Re: [Xen-devel] [PATCH v3 07/47] xen/sched: move per cpu scheduler private data into struct sched_resource

2019-09-24 Thread Dario Faggioli
ode churn) is > > indeed better than naming at least new variable instances properly > > right away. > > Okay with me. What do scheduler maintainers think? > I do prefer 'sr'. As to whether this happens right now, but only for new variables, or all at once in a fo

Re: [Xen-devel] [PATCH v3 08/47] xen/sched: switch vcpu_schedule_lock to unit_schedule_lock

2019-09-24 Thread Dario Faggioli
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > Rename vcpu_schedule_[un]lock[_irq]() to > unit_schedule_[un]lock[_irq]() > and let it take a sched_unit pointer instead of a vcpu pointer as > parameter. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario F

Re: [Xen-devel] [PATCH v3 09/47] xen/sched: move some per-vcpu items to struct sched_unit

2019-09-24 Thread Dario Faggioli
broken affinity" when any of its vcpus has the affinity_broken flag > set. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization

Re: [Xen-devel] [PATCH v3 11/47] xen/sched: rename scheduler related perf counters

2019-09-24 Thread Dario Faggioli
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > Rename the scheduler related perf counters from vcpu* to unit* where > appropriate. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtuali

Re: [Xen-devel] [PATCH v3 00/47] xen: add core scheduling support

2019-09-24 Thread Dario Faggioli
Hopefully this gives some level of confidence to this series and the > plan about including it into 4.13 [1] > Thanks a lot for doing this, and for letting us know. Can I ask whether the tests were done using Credit2 (i.e., upstream default) or Credit1, as scheduler? Thanks again and

Re: [Xen-devel] [PATCH v3 23/47] xen/sched: switch sched_move_irqs() to take sched_unit as parameter

2019-09-24 Thread Dario Faggioli
> Reviewed-by: Dario Faggioli (Stands with parameter constified as suggested.) Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --- <> (Rai

Re: [Xen-devel] [PATCH v3 26/47] xen/sched: Change vcpu_migrate_*() to operate on schedule unit

2019-09-24 Thread Dario Faggioli
en called" would sound better. It's, of course, not your fault, but I guess we can consider adjusting it, since we are touching the line above it. Or maybe you also want to queue it up for the cleanup series? Regards

Re: [Xen-devel] [PATCH 2/2] xen/sched: fix freeing per-vcpu data in sched_move_domain()

2019-09-25 Thread Dario Faggioli
scheduler needs to remove the vcpu-data from a list). > > So instead xfree() make use of the sched_free_vdata() hook. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Softwa

Re: [Xen-devel] [PATCH 1/2] xen/sched: fix locking in a653sched_free_vdata()

2019-09-25 Thread Dario Faggioli
Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --- <> (Raistlin Majere) signature.asc De

Re: [Xen-devel] [PATCH v3 14/47] xen/sched: make null scheduler vcpu agnostic.

2019-09-25 Thread Dario Faggioli
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > Switch null scheduler completely from vcpu to sched_unit usage. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli With, if possible, all the occurrences of 'item' in comments actually replaced w

Re: [Xen-devel] [PATCH v3 15/47] xen/sched: make rt scheduler vcpu agnostic.

2019-09-25 Thread Dario Faggioli
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > Switch rt scheduler completely from vcpu to sched_unit usage. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli With just one additional note. > * This scheduler follows the Preemptive Global Earliest D

Re: [Xen-devel] [PATCH v3 18/47] xen/sched: make arinc653 scheduler vcpu agnostic.

2019-09-25 Thread Dario Faggioli
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > Switch arinc653 scheduler completely from vcpu to sched_unit usage. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Similar considerations to the ones I made on sched_rt applies here, I guess. But again, as

Re: [Xen-devel] [PATCH v3 16/47] xen/sched: make credit scheduler vcpu agnostic.

2019-09-25 Thread Dario Faggioli
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > Switch credit scheduler completely from vcpu to sched_unit usage. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engine

Re: [Xen-devel] [PATCH v3 17/47] xen/sched: make credit2 scheduler vcpu agnostic.

2019-09-25 Thread Dario Faggioli
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > Switch credit2 scheduler completely from vcpu to sched_unit usage. > > As we are touching lots of lines remove some white space at the end > of > the line, too. > > Signed-off-by: Juergen Gross > Reviewed-by: Dar

Re: [Xen-devel] [PATCH v3 19/47] xen: add sched_unit_pause_nosync() and sched_unit_unpause()

2019-09-25 Thread Dario Faggioli
nit->vcpu_list); > +} > + > +static inline void sched_unit_unpause(struct sched_unit *unit) > +{ > +vcpu_unpause(unit->vcpu_list); > +} > + So, isn't this another one of those places where we could have the for_each_unit_vcpu() loop already? Regards -- Dario Fa

Re: [Xen-devel] [PATCH v3 12/47] xen/sched: switch struct task_slice from vcpu to sched_unit

2019-09-25 Thread Dario Faggioli
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > Let the schedulers put a sched_unit pointer into struct task_slice > instead of a vcpu pointer. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me

Re: [Xen-devel] [PATCH v3 13/47] xen/sched: add is_running indicator to struct sched_unit

2019-09-25 Thread Dario Faggioli
; > At the same time introduce a state_entry_time field in struct > sched_unit being updated whenever the is_running indicator is > changed. > Use that new field in the schedulers instead of the similar vcpu > field. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Fag

Re: [Xen-devel] dom0less + sched=null => broken in staging

2019-09-25 Thread Dario Faggioli
On Wed, 2019-09-25 at 16:19 +0100, Julien Grall wrote: > (+Juergen) > > Hi Dario, > Hi, > On 11/09/2019 14:53, Dario Faggioli wrote: > > On Fri, 2019-08-23 at 18:16 -0700, Stefano Stabellini wrote: > > Ok, thanks again for testing, and good to know. > >

Re: [Xen-devel] [PATCH v3 20/47] xen: let vcpu_create() select processor

2019-09-25 Thread Dario Faggioli
o. > > Signed-off-by: Juergen Gross > Acked-by: Andrew Cooper > Acked-by: Julien Grall > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ ---

Re: [Xen-devel] [PATCH v3 22/47] xen/sched: switch schedule() from vcpus to sched_units

2019-09-25 Thread Dario Faggioli
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > Use sched_units instead of vcpus in schedule(). This includes the > introduction of sched_unit_runstate_change() as a replacement of > vcpu_runstate_change() in schedule(). > > Signed-off-by: Juergen Gross > Reviewed-

Re: [Xen-devel] [PATCH v3 26/47] xen/sched: Change vcpu_migrate_*() to operate on schedule unit

2019-09-25 Thread Dario Faggioli
On Wed, 2019-09-25 at 14:04 +0200, Jürgen Groß wrote: > On 25.09.19 00:33, Dario Faggioli wrote: > > > > > As it is needed anyway call vcpu_sync_execstate() for each > > > vcpu of the unit when changing processors. > > > > > Again, what do you mean with

Re: [Xen-devel] [PATCH v3 36/47] xen/sched: carve out freeing sched_unit memory into dedicated function

2019-09-25 Thread Dario Faggioli
... > > > I can merge this patch into patch 3 if you like that better. > > ... yes, personally I'd prefer this, but in the end it's the call > of the scheduler maintainers. > Yes, I think I like it better too for the patches to be merged. Regards -- Dario Faggio

Re: [Xen-devel] [PATCH v3 37/47] xen/sched: move per-cpu variable scheduler to struct sched_resource

2019-09-26 Thread Dario Faggioli
; the function afaics, and hence "ops" could be used here. > > "sd" is now "sr" everywhere. > > And yes, using ops here seems okay. > > > Preferably with the suggested adjustments (but final judgement is > > with the scheduler maintainers any

Re: [Xen-devel] [PATCH v3 38/47] xen/sched: move per-cpu variable cpupool to struct sched_resource

2019-09-26 Thread Dario Faggioli
On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > Having a pointer to struct cpupool in struct sched_resource instead > of per cpu is enough. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli

Re: [Xen-devel] [PATCH v3 39/47] xen/sched: reject switching smt on/off with core scheduling active

2019-09-26 Thread Dario Faggioli
socket scheduling. > > Signed-off-by: Juergen Gross > Acked-by: Jan Beulich > Acked-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --

Re: [Xen-devel] [PATCH v3 46/47] xen/sched: disable scheduling when entering ACPI deep sleep states

2019-09-26 Thread Dario Faggioli
ividual cpus are offlined. > > Disabling the scheduler is done by replacing the softirq handler > with a dummy scheduling routine only enabling tasklets to run. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me

Re: [Xen-devel] [PATCH v3 40/47] xen/sched: prepare per-cpupool scheduling granularity

2019-09-26 Thread Dario Faggioli
ng. In fact, as said elsewhere already, I really don't expect anyone to want to use either die- scheduling, socket-scheduling or anything different than core- scheduling anytime soon. I'll look into the Credit2 runq

Re: [Xen-devel] [PATCH v3 47/47] xen/sched: add scheduling granularity enum

2019-09-26 Thread Dario Faggioli
(x86 only) > "sched-gran". > > According to the selected granularity sched_granularity is set after > all cpus are online. > > A test is added for all sched resources holding the same number of > cpus. Fall back to core- or cpu-scheduling in that case. > > Si

Re: [Xen-devel] [PATCH v3 21/47] xen/sched: use sched_resource cpu instead smp_processor_id in schedulers

2019-09-26 Thread Dario Faggioli
es should be replaced by the master_cpu number of the > local > sched_resource instead. > > Add a helper to get that sched_resource master_cpu and modify the > schedulers to use it in a correct way. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards --

Re: [Xen-devel] [PATCH v3 27/47] xen/sched: move struct task_slice into struct sched_unit

2019-09-26 Thread Dario Faggioli
directly set the different units in struct > sched_unit instead of using an on-stack copy for returning the data. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Softwa

Re: [Xen-devel] [PATCH v3 26/47] xen/sched: Change vcpu_migrate_*() to operate on schedule unit

2019-09-26 Thread Dario Faggioli
On Thu, 2019-09-26 at 06:51 +0200, Jürgen Groß wrote: > On 25.09.19 18:37, Dario Faggioli wrote: > > > This is done by vcpu_sync_execstate(). Without the explicit call > > > it would be done either when the vcpu is being scheduled on the > > > new > > > c

Re: [Xen-devel] [PATCH v3 30/47] xen/sched: add support for multiple vcpus per sched unit where missing

2019-09-26 Thread Dario Faggioli
eems to be more expensive as the current variant, too. > > It's not this much more expensive, and it eliminates unexpected > (as I would call it) behavior, so I think I'd go this route. > So, I honestly like the way it's currently done in Juergen's pat

Re: [Xen-devel] [PATCH v3 47/47] xen/sched: add scheduling granularity enum

2019-09-26 Thread Dario Faggioli
On Thu, 2019-09-26 at 14:37 +0200, Jürgen Groß wrote: > On 26.09.19 11:46, Dario Faggioli wrote: > > On Sat, 2019-09-14 at 10:52 +0200, Juergen Gross wrote: > > > Add a scheduling granularity enum ("cpu", "core", "socket") for > > > specifi

Re: [Xen-devel] [PATCH v3 30/47] xen/sched: add support for multiple vcpus per sched unit where missing

2019-09-26 Thread Dario Faggioli
On Thu, 2019-09-26 at 16:40 +0200, Jürgen Groß wrote: > On 26.09.19 15:53, Dario Faggioli wrote: > > However, I'm not sure I understand what it is the issue that Jan > > thinks > > that has, and in what sense the code/behavior is regarded as > > "unexpect

Re: [Xen-devel] [PATCH v3 35/47] xen/sched: make vcpu_wake() and vcpu_sleep() core scheduling aware

2019-09-27 Thread Dario Faggioli
. In that > case we need the sched_wake() call even if the unit is still running. > TBH, I think it is ok for this call to be unconditional. Indeed it looks a bit weird when you compare this to the sched_sleep() calls in vcpu_sleep_nosync_locked(), as they are conditional, but I think a

Re: [Xen-devel] [PATCH v4 10/46] xen/sched: add scheduler helpers hiding vcpu

2019-09-27 Thread Dario Faggioli
ic physical cpu > > Signed-off-by: Juergen Gross > With that fixed: Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ -

Re: [Xen-devel] [PATCH v4 19/46] xen: add sched_unit_pause_nosync() and sched_unit_unpause()

2019-09-27 Thread Dario Faggioli
> Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --- <> (Raistlin Majere) signature.asc Description: Th

Re: [Xen-devel] [PATCH v4 20/46] xen: let vcpu_create() select processor

2019-09-27 Thread Dario Faggioli
asily. Note that > this functionality is x86 only. > > Signed-off-by: Juergen Gross > Acked-by: Julien Grall > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/

Re: [Xen-devel] [PATCH v4 25/46] xen/sched: add runstate counters to struct sched_unit

2019-09-27 Thread Dario Faggioli
: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --- <> (Raistlin Majere) signature.asc Descript

Re: [Xen-devel] [PATCH v4 24/46] xen: switch from for_each_vcpu() to for_each_sched_unit()

2019-09-27 Thread Dario Faggioli
scheduler() use it. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli One thing I spotted is that, here... > --- a/xen/common/schedule.c > +++ b/xen/common/schedule.c > @@ -157,26 +157,32 @@ static inline struct scheduler > *dom_scheduler(const struct domain *d)

Re: [Xen-devel] [PATCH v4 26/46] xen/sched: Change vcpu_migrate_*() to operate on schedule unit

2019-09-27 Thread Dario Faggioli
scheduled on the old > processor). > > vcpu_move_locked() is switched to schedule unit, too. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Sof

Re: [Xen-devel] [PATCH v4 31/46] xen/sched: modify cpupool_domain_cpumask() to be an unit mask

2019-09-27 Thread Dario Faggioli
it return a cpumask with only > one bit set per scheduling resource. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, S

Re: [Xen-devel] [PATCH v4 28/46] xen/sched: add code to sync scheduling of all vcpus of a sched unit

2019-09-27 Thread Dario Faggioli
DULE_SOFTIRQ events. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --- <>

Re: [Xen-devel] [PATCH v4 30/46] xen/sched: add support for multiple vcpus per sched unit where missing

2019-09-27 Thread Dario Faggioli
Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --- <> (Raistlin Majere) signature.asc Description: This is a

Re: [Xen-devel] [PATCH v4 32/46] xen/sched: support allocating multiple vcpus into one sched unit

2019-09-27 Thread Dario Faggioli
() as that relies on for_each_sched_unit_vcpu() which in > turn needs the vcpu already as a member of the domain's vcpu linked > list, which isn't the case. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualiz

Re: [Xen-devel] [PATCH v4 33/46] xen/sched: add a percpu resource index

2019-09-27 Thread Dario Faggioli
, but with core > scheduling > it will be possible to have higher values, too. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE L

Re: [Xen-devel] [PATCH v4 34/46] xen/sched: add fall back to idle vcpu when scheduling unit

2019-09-27 Thread Dario Faggioli
d by other domains (as far as possible). Softirqs are considered > to > be save. > > In order to avoid livepatching when going to guest idle another > variant of reset_stack_and_jump() not calling > check_for_livepatch_work > is needed. > > Signed-off-by: Juergen Gr

Re: [Xen-devel] [PATCH v4 35/46] xen/sched: make vcpu_wake() and vcpu_sleep() core scheduling aware

2019-09-27 Thread Dario Faggioli
tic as it is used in > schedule.c only. > > Signed-off-by: Juergen Gross > I'm ok with the code in this patch. I'd just like to see the comment(s) around the asymmetry between vcpu_sleep_xxx() and vcpu_wake() added, as agreed upon this morning (in the V3 thread). Regar

Re: [Xen-devel] [PATCH v4 39/46] xen/sched: prepare per-cpupool scheduling granularity

2019-09-27 Thread Dario Faggioli
> Move the granularity related variables to cpupool.c as they are now > used form there only. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli

Re: [Xen-devel] [PATCH v4 40/46] xen/sched: split schedule_cpu_switch()

2019-09-27 Thread Dario Faggioli
pus as the idle scheduler doesn't need such data. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE La

Re: [Xen-devel] [PATCH v4 41/46] xen/sched: protect scheduling resource via rcu

2019-09-27 Thread Dario Faggioli
ng resources. This in turn requires to modify > the cpu <-> scheduling resource relation. In order to be able to free > unused resources protect struct sched_resource via RCU. This ensures > there are no users left when freeing such a resource. > > Signed-off-by: Juergen Gro

Re: [Xen-devel] [PATCH v4 42/46] xen/sched: support multiple cpus per scheduling resource

2019-09-27 Thread Dario Faggioli
gen Gross > Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --- <> (Raistlin Majere) signature.asc Descri

Re: [Xen-devel] [PATCH v4 43/46] xen/sched: support differing granularity in schedule_cpu_[add/rm]()

2019-09-27 Thread Dario Faggioli
ing resource with more than one cpu. > > Handle that by having arrays of old/new pdata and vdata and loop over > those where appropriate. > > Additionally the scheduling resource(s) must either be merged or > split. > > Signed-off-by: Juergen Gross > Reviewed-by: Dari

Re: [Xen-devel] [PATCH v4 44/46] xen/sched: support core scheduling for moving cpus to/from cpupools

2019-09-27 Thread Dario Faggioli
On Fri, 2019-09-27 at 09:00 +0200, Juergen Gross wrote: > With core scheduling active it is necessary to move multiple cpus at > the same time to or from a cpupool in order to avoid split scheduling > resources in between. > > Signed-off-by: Juergen Gross > Reviewed-by: Dario

Re: [Xen-devel] [PATCH v4 00/46] xen: add core scheduling support

2019-09-27 Thread Dario Faggioli
I've asked more comments this morning. If the patch have to go in by today, I guess I'm fine with that patch going in as it is (i.e., committers can add my `Reviewed-by:`), as far as the additional comments come in a follow-up patch as soon as possible. Thanks and Regards, Dario --

Re: [Xen-devel] [PATCH v5 02/19] xen/sched: introduce unit_runnable_state()

2019-09-30 Thread Dario Faggioli
a new helper unit_runnable_state() which > will save the new runstate of all tested vcpus in a new field of the > vcpu struct. > > Signed-off-by: Juergen Gross > --- > RFC V2: > - new patch > V3: > - add vcpu loop to unit_runnable_state() right now instead of doing

Re: [Xen-devel] [PATCH v5 08/19] xen/sched: make vcpu_wake() and vcpu_sleep() core scheduling aware

2019-09-30 Thread Dario Faggioli
ke cpu parameter unsigned int (Jan Beulich) > - comments (Jan Beulich) > - use true instead 1 for setting bool (Jan Beulich) > - const parameter (Jan Beulich) > V5: > - add comments (Dario Faggioli) > Reviewed-by: Dario Faggioli Thanks and Regards -- Dario Faggioli, Ph.D http

Re: [Xen-devel] [PATCH v5 07/19] xen/sched: add fall back to idle vcpu when scheduling unit

2019-09-30 Thread Dario Faggioli
d by other domains (as far as possible). Softirqs are considered > to > be save. > > In order to avoid livepatching when going to guest idle another > variant of reset_stack_and_jump() not calling > check_for_livepatch_work > is needed. > > Signed-off-by: Juergen Gr

Re: [Xen-devel] [PATCH] sched/credit: avoid priority boost for capped domains when unpark

2019-05-03 Thread Dario Faggioli
g. > Mmm... I'm not an expert of these things, but doesn't this means we need a "Signed-off-by: Xi Xiong " then? Cc-ing Lars... > Signed-off-by: Eslam Elnikety > Reviewed-by: Leonard Foerster > Reviewed-by: Petre Eftime > About the patch itself: Acked-by

Re: [Xen-devel] [PATCH RFC V2 01/45] xen/sched: add inline wrappers for calling per-scheduler functions

2019-05-06 Thread Dario Faggioli
t; +s->free_pdata(s, data, cpu); > +else > +/* > + * Check that if there isn't a free_pdata hook, we haven't > got any > + * data we're expected to deal with. > + */ > + ASSERT(!data); > +} > Doing,

Re: [Xen-devel] [PATCH] xen:arm: we never get into schedule_tail() with prev==current

2019-05-08 Thread Dario Faggioli
hedule_tail() > with ASSERT() which is the development (debug) build guard. > > Signed-off-by: Andrii Anisov > FWIW, Reviewed-by: Dario Faggioli Thanks and Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE

Re: [Xen-devel] [PATCH RFC V2 02/45] xen/sched: use new sched_item instead of vcpu in scheduler interfaces

2019-05-08 Thread Dario Faggioli
tity* with which the scheduler deals. > I realize changing it here probably means also changing it in the > next > 43 patches as well. > Indeed! :-O Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://w

Re: [Xen-devel] [PATCH RFC V2 02/45] xen/sched: use new sched_item instead of vcpu in scheduler interfaces

2019-05-08 Thread Dario Faggioli
ne length, indentation) manually afterwards. > Ah, right, I didn't spot that 'item' and 'unit' are the same length. Makes sense. > So Dario, > would you be fine with "unit"? This might save me some hours of work. > I guess I am, yes. I like it more than

Re: [Xen-devel] [PATCH RFC V2 01/45] xen/sched: add inline wrappers for calling per-scheduler functions

2019-05-09 Thread Dario Faggioli
ests. > +1 > Hmm, thinking more about it: why don't we just drop those > ASSERT/BUG_ON > for mandatory functions and test them when doing the global_init() > loop > over all schedulers. We could just reject schedulers with missing > functions. > +10 :-D Regards --

Re: [Xen-devel] [PATCH] xen/sched: fix csched2_deinit_pdata()

2019-05-09 Thread Dario Faggioli
sh I managed to put a cpupool test in OSSTest. I guess I can pickup my old draft, but I need some time to put together an OSSTest dev environment again. :-/ Anyway... > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli Thanks and Regards -- Dario Faggioli, Ph.D http://about.me/dar

Re: [Xen-devel] [PATCH RFC V2 45/45] xen/sched: add scheduling granularity enum

2019-05-10 Thread Dario Faggioli
portant. > I agree. Isn't it the case that (but note that I'm just thinking out loud here), if we make smt= and sched-gran= per-cpupool, the user gains the chance to use both, if he/she wants (e.g., for testing)? If yes, is such a thing valuable enough that it'd it make sense to wo

Re: [Xen-devel] [PATCH] xen: schedule: initialize 'now' when really needed

2019-05-31 Thread Dario Faggioli
On Fri, 2019-05-31 at 14:31 +0800, Baodong Chen wrote: > when 'periodic_period' is zero, there is no need to initialize 'now'. > > Signed-off-by: Baodong Chen > --- > xen/common/schedule.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Ack

Re: [Xen-devel] [PATCH] xen: make keyhanler configurable

2019-05-31 Thread Dario Faggioli
domain *d); > int cpupool_move_domain(struct domain *d, struct cpupool *c); > int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op); > +#ifdef CONFIG_HAS_KEYHANDLER > void schedule_dump(struct cpupool *c); > extern void dump_runq(unsigned char

Re: [Xen-devel] [PATCH v3] schedule: move last_run_time to the credit scheduler privates

2019-05-31 Thread Dario Faggioli
nding something that is short and, at the same time, clear enough), or we change how the variable is using. Like, e.g., in csched_schedule(), we first set it to 0, and then we update it with `now` for `prev` if `prev != next && !is_idle(prev)` (or something like that) The rest of the patch looks

Re: [Xen-devel] [PATCH 54/60] xen/sched: add minimalistic idle scheduler for free cpus

2019-05-31 Thread Dario Faggioli
s to be as simple as possible, even simpler than null... And I think we can easily see why that's the case, just by looking at what code this patch let us remove (e.g., the need for some of the checking of `system_state` in cpupool or scheduler code, just to men

Re: [Xen-devel] [PATCH 54/60] xen/sched: add minimalistic idle scheduler for free cpus

2019-05-31 Thread Dario Faggioli
ake of not making rebasing 60 patches more complicated than it must be already, for you :-D). Let me know what you think. Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --

Re: [Xen-devel] [PATCH v3] schedule: move last_run_time to the credit scheduler privates

2019-06-11 Thread Dario Faggioli
On Mon, 2019-06-10 at 18:16 +0300, Andrii Anisov wrote: > On 31.05.19 16:24, Dario Faggioli wrote: > > --- a/xen/common/sched_credit.c > > +++ b/xen/common/sched_credit.c > > @@ -175,6 +175,9 @@ struct csched_vcpu { > > atomic_t credit; >

Re: [Xen-devel] [PATCH] xen: superficial clean-ups

2019-06-11 Thread Dario Faggioli
optimize this write away. > > > > So, I guess I'd be OK with this particular hunk. Dario, any > > opinions? > I'm ok with it too, but... > I'd rather switch to PTR_ERR() here dropping the perr parameter. > ... I'd be even more ok with this! :-)

Re: [Xen-devel] [PATCH 01/60] xen/sched: only allow schedulers with all mandatory functions available

2019-06-11 Thread Dario Faggioli
thread already, I personally do like this (and things like to this) quite a bit... Thanks for doing it! Reviewed-by: Dario Faggioli Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE ht

Re: [Xen-devel] [PATCH 02/60] xen/sched: add inline wrappers for calling per-scheduler functions

2019-06-11 Thread Dario Faggioli
uergen Gross > Reviewed-by: Dario Faggioli Thanks and Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --- <> (Raistlin Majere) signature.

Re: [Xen-devel] [PATCH 03/60] xen/sched: let sched_switch_sched() return new lock address

2019-06-11 Thread Dario Faggioli
is change, we don't any longer. That being said, I've tried to think about how this could be a problem, but failed at imagining such a scenario, so: > Signed-off-by: Juergen Gross > Reviewed-by: Dario Faggioli I'm wondering whether it make sense for the above to be quickl

Re: [Xen-devel] [PATCH 49/60] xen/sched: reject switching smt on/off with core scheduling active

2019-06-12 Thread Dario Faggioli
an appropriate error code for > > this new case. -EPERM, -EACCES, or -EIO would all seem more > > appropriate to me (and perhaps there are further ones). > > I think -EIO or -EBUSY would be the best fit. > I agree, with mild preference for EBUSY. Regards -- Dario Faggioli,

Re: [Xen-devel] [PATCH 03/60] xen/sched: let sched_switch_sched() return new lock address

2019-06-12 Thread Dario Faggioli
On Wed, 2019-06-12 at 10:06 +0200, Juergen Gross wrote: > On 12.06.19 09:40, Jan Beulich wrote: > > > > > On 11.06.19 at 18:55, wrote: > > > On Tue, 2019-05-28 at 12:32 +0200, Juergen Gross wrote: > > > > Signed-off-by: Juergen Gross > > > >

Re: [Xen-devel] [PATCH 03/60] xen/sched: let sched_switch_sched() return new lock address

2019-06-12 Thread Dario Faggioli
however, I think the comment needs to be adjusted too, and the commit message needs to briefly mention this new change we're doing. Maybe, for the comment, add something like: "The smp_wmb() corresponds to the barrier implicit in successfully taking the lock." And, for the chang

Re: [Xen-devel] [PATCH v4] schedule: move credit scheduler specific member to its privates

2019-06-12 Thread Dario Faggioli
also: > - turn last_sched_time into s_time_t, which is more appropriate. > - properly const-ify related argument of > __csched_vcpu_is_cache_hot(). > > Signed-off-by: Andrii Anisov > Reviewed-by: Dario Faggioli Thanks and Regards -- Dario Faggiol

Re: [Xen-devel] [PATCH 03/60] xen/sched: let sched_switch_sched() return new lock address

2019-06-12 Thread Dario Faggioli
ponding *_schedule_unlock_*() ones, of course. ;-P Regards -- Dario Faggioli, Ph.D http://about.me/dario.faggioli Virtualization Software Engineer SUSE Labs, SUSE https://www.suse.com/ --- <> (Raistlin Majere) signature.asc

Re: [Xen-devel] [PATCH] sched/credit2: remove stale comment

2019-01-09 Thread Dario Faggioli
gen Gross > Acked-by: Dario Faggioli Thanks, Dario -- <> (Raistlin Majere) ----- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Software Engineer @ SUSE https://www.suse.com/ signature.asc Description: Th

Re: [Xen-devel] [PATCH] doc: correct default scheduler in xen-command-line.pandoc

2019-01-17 Thread Dario Faggioli
Depends on enabled > > > > schedulers. > > The Kconfig default is credit2. > > Only when credit2 is compiled in, which isn't even the the case for > all > Kconfig fragments we have in tree. > So, basically, what you're saying is that we need a patch t

  1   2   3   4   5   6   7   8   >