Re: [Xen-devel] Ping: [PATCH] VMX: sync CPU state upon vCPU destruction

2017-11-21 Thread Dario Faggioli
ize, if it were me doing this, I'd sync either in vmx_vcpu_destroy() or in complete_domain_destroy(). But (for what it's worth) I'm fine with it happening in rcu_do_batch(). Regards, Dario -- <> (Raistlin Majere)

Re: [Xen-devel] [PATCH] VMX: sync CPU state upon vCPU destruction

2017-11-10 Thread Dario Faggioli
ough, I guess it will have, at least potentially, an impact on performance (as other solutions envisioned in the thread). Any idea how big the hit could be? Regards, Dario -- <> (Raistlin Majere) - Dario Faggioli, Ph.D

Re: [Xen-devel] [PATCH] VMX: sync CPU state upon vCPU destruction

2017-11-09 Thread Dario Faggioli
On Thu, 2017-11-09 at 07:49 -0700, Jan Beulich wrote: > See the code comment being added for why we need this. > > Reported-by: Igor Druzhinin > Signed-off-by: Jan Beulich > Reviewed-by: Dario Faggioli Regards, Dario -- <

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Dario Faggioli
look. What about the effect on performance, though? I mean, assuming that lazy context switch does a good job, with respect to that, by avoiding synching in enough case where it is actually not necessary, how do things change if we start to sync at any softirq, even when the handler would have not re

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Dario Faggioli
think it is indeed more general, as in, without even the need to consider a second pCPU: pCPU1 = current == vCPU1 context_switch(next == idle) !! __context_switch() is skipped vcpu_migrate(vCPU1) anything_that_uses_or_touches_context() So, it must be anything_that_uses_or_touches_context

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Dario Faggioli
ble. > > That's not what Igor's diagram says - it's indicating the fact that > is_running is being set to 1 in the process of context switching > into vCPUx. > Ah, ok. So I was right: I indeed was misunderstanding something, i.e., the diagram itself. :-) Now I ge

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Dario Faggioli
ioned, and it was being considered to treat that in a special way. But it looks to me that something very similar may, at least in theory, happen any time a lazy context switch occurs, no matter whether the pCPU has become idle because the previously running vCPU wants to move, or because it blo

Re: [Xen-devel] [PATCH v2 1/2] VMX: fix VMCS race on context-switch paths

2017-11-09 Thread Dario Faggioli
ecide to pick vCPUx from the runqueue and switch to it _only_ if it has gone through vcpu_wake(), which must actually have woken up it, which happens if _VPF_migrating has been cleared, which means is_running was 0 already. Dario -- <> (Raistlin Majere) --

[Xen-devel] [For Xen-4.10 PATCH] docs/features: update the status of Credit2 implemented features

2017-11-06 Thread Dario Faggioli
As soft-affinity and caps will be available in Xen 4.10. Signed-off-by: Dario Faggioli --- Cc: George Dunlap Cc: Julien Grall Cc: Lars Kurth --- Julien, doc change, so no risk. Sorry I missed doing this at the same time of the changes themselves. --- docs/features/sched_credit2.pandoc

Re: [Xen-devel] [PATCH v4 4/5] xentrace: enable per-VCPU extratime flag for RTDS

2017-10-17 Thread Dario Faggioli
On Wed, 2017-10-11 at 14:02 -0400, Meng Xu wrote: > Change repl_budget event output for xentrace formats and xenalyze > > Signed-off-by: Meng Xu > I'd say: Reviewed-by: Dario Faggioli However... > diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c >

Re: [Xen-devel] [PATCH v4 0/5] Towards work-conserving RTDS

2017-10-17 Thread Dario Faggioli
On Tue, 2017-10-17 at 09:26 +0200, Dario Faggioli wrote: > On Thu, 2017-10-12 at 10:34 -0400, Meng Xu wrote: > > On Thu, Oct 12, 2017 at 5:02 AM, Wei Liu > > wrote: > > > > > > FYI all patches except the xentrace one were committed yesterday. > > > >

Re: [Xen-devel] [PATCH v4 0/5] Towards work-conserving RTDS

2017-10-17 Thread Dario Faggioli
nks and Regards, Dario -- <> (Raistlin Majere) ----- Dario Faggioli, Ph.D, http://about.me/dario.faggioli signature.asc Description: This is a digitally signed message part ___ Xen-dev

Re: [Xen-devel] [PATCH v3 4/5] xentrace: enable per-VCPU extratime flag for RTDS

2017-10-11 Thread Dario Faggioli
", budget = %"PRIu64"\n", > + ri->dump_header, r->domid, r->vcpuid, > + r->priority_level, r->cur_dl, r->cur_bg); > } > break; > case TRC_SCHED_CLASS_

Re: [Xen-devel] [PATCH v3 2/5] libxl: enable per-VCPU extratime flag for RTDS

2017-10-11 Thread Dario Faggioli
On Tue, 2017-10-10 at 19:17 -0400, Meng Xu wrote: > Modify libxl_vcpu_sched_params_get/set and sched_rtds_vcpu_get/set > functions to support per-VCPU extratime flag > > Signed-off-by: Meng Xu > Reviewed-by: Dario Faggioli Regards, Dario -- <

Re: [Xen-devel] [PATCH v3 1/5] xen:rtds: towards work conserving RTDS

2017-10-11 Thread Dario Faggioli
ties. > Depleted queue holds VCPUs which have extratime flag cleared and > depleted budget. > Replenished queue is not modified. > > Distribution of spare bandwidth > Spare bandwidth is distributed among all VCPUs with extratime flag > set, > proportional to these VCP

Re: [Xen-devel] [PATCH v3 5/5] docs: enable per-VCPU extratime flag for RTDS

2017-10-11 Thread Dario Faggioli
On Tue, 2017-10-10 at 19:17 -0400, Meng Xu wrote: > Revise xl tool use case by adding -e option > Remove work-conserving from TODO list > > Signed-off-by: Meng Xu > Reviewed-by: Dario Faggioli Regards, Dario -- <

Re: [Xen-devel] [PATCH v3 3/5] xl: enable per-VCPU extratime flag for RTDS

2017-10-11 Thread Dario Faggioli
On Tue, 2017-10-10 at 19:17 -0400, Meng Xu wrote: > Change main_sched_rtds and related output functions to support > per-VCPU extratime flag. > > Signed-off-by: Meng Xu > Reviewed-by: Dario Faggioli Regards, Dario -- <

Re: [Xen-devel] [PATCH v2 3/5] xl: enable per-VCPU extratime flag for RTDS

2017-10-09 Thread Dario Faggioli
On Mon, 2017-10-09 at 12:13 -0400, Meng Xu wrote: > On Wed, Sep 13, 2017 at 8:51 PM, Dario Faggioli > wrote: > > > > On Fri, 2017-09-01 at 11:58 -0400, Meng Xu wrote: > > > diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c > > > index ba0159d.

Re: [Xen-devel] [PATCH v3 1/3] xen: RCU: let the RCU idle timer handler run

2017-10-09 Thread Dario Faggioli
r sending v4. > Which, AFAICS, you've done, and checked in the series. Thanks! Dario -- <> (Raistlin Majere) ----- Dario Faggioli, Ph.D, http://about.me/dario.faggioli signature.asc Descript

Re: [Xen-devel] [PATCH] Changing my email address

2017-10-06 Thread Dario Faggioli
On Thu, 2017-10-05 at 13:19 -0400, Meng Xu wrote: > On Thu, Oct 5, 2017 at 10:28 AM, Dario Faggioli > wrote: > > > > Soon I won't have access to dario.faggi...@citrix.com email > > address. > > It's sad to hear this. :( > Things change. It's lif

[Xen-devel] [PATCH] MAINTAINERS: update entries to new email address.

2017-10-05 Thread Dario Faggioli
Replace, in the 'M:' fields of the components I co-maintain ('CPU POOLS', 'SCHEDULING' and 'RTDS SCHEDULER'), the Citrix email, to which I don't have access any longer, with my personal email. Signed-off-by: Dario Faggioli --- Cc: Andrew Cooper

[Xen-devel] [PATCH] Changing my email address

2017-10-05 Thread Dario Faggioli
TDS entry, from 'S' to 'M'. Regards, Dario --- Dario Faggioli (1): MAINTAINERS: update entries to new email address. MAINTAINERS |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- << ... ... ... >> ----

Re: [Xen-devel] [PATCH 3/4] xen: sched: improve checking soft-affinity

2017-10-05 Thread Dario Faggioli
On Wed, 2017-10-04 at 14:23 +0100, George Dunlap wrote: > On 09/15/2017 06:35 PM, Dario Faggioli wrote: > > > > diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c > > index 3efbfc8..35d0c98 100644 > > --- a/xen/common/sched_credit.c > >

Re: [Xen-devel] high CPU stolen time after live migrate

2017-10-03 Thread Dario Faggioli
ebugging-a-flaky-cpu-steal-time-counter-on-a-parav irtualized-xen-guest/ What's the version of your guest kernel? Dario -- <> (Raistlin Majere) ----- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engine

Re: [Xen-devel] [PATCH v2 0/5] Towards work-conserving RTDS

2017-10-02 Thread Dario Faggioli
one with w=256). This is kind of similar with what Linux does with scheduling classes, but even more flexible. I am not working on implementing this right now, because I'm busy with other things, but I would like to do that at some point. And if you're up for helping, that would be grea

[Xen-devel] [PATCH] xen: Credit2: stop hitting a BU_ON() when creating a Credit2 cpupool

2017-09-29 Thread Dario Faggioli
s more extensive use of the c2rqd() helper, making the code more uniform and easier to read; * requires the hook csched2_{alloc,free}_pdata to be defined for Credit2; * requires the assignment of new values to 'scheduler' and 'schedule_data.sched_priv' per-cpu variables

Re: [Xen-devel] RT-Xen on ARM

2017-09-28 Thread Dario Faggioli
On Thu, 2017-09-28 at 18:01 +0200, Dario Faggioli wrote: > On Thu, 2017-09-28 at 12:18 +0300, Andrii Anisov wrote: > > > > > The GP scheduler --like Credit1 or Credit2, if you are on Xen-- will > give you fairness, but without any precise temporal guarantee. This > means

Re: [Xen-devel] [PATCH v2 2/3] xen: RCU: make the period of the idle timer configurable.

2017-09-28 Thread Dario Faggioli
header); --- -- <> (Raistlin Majere) ----- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) signature.asc Description: This is a digitally signed message part ___

[Xen-devel] [PATCH v3 0/3] xen: RCU: Improve the idle timer handling

2017-09-28 Thread Dario Faggioli
And now take 3. v1: https://lists.xen.org/archives/html/xen-devel/2017-09/msg01855.html v2: https://lists.xen.org/archives/html/xen-devel/2017-09/msg03515.html I've just took care of Jan's comments to v2. Details in single patches. Thanks and Regards, Dario --- Dario Faggioli (3):

[Xen-devel] [PATCH v3 1/3] xen: RCU: let the RCU idle timer handler run

2017-09-28 Thread Dario Faggioli
handle the TIMER_SOFTIRQ (which will perform the timer deactivation and run its handler). Signed-off-by: Dario Faggioli --- Cc: Andrew Cooper Cc: George Dunlap Cc: Jan Beulich Cc: Stefano Stabellini Cc: Julien Grall Cc: Tim Deegan --- Changes from v2: - improved comment in rcu_idle_

[Xen-devel] [PATCH v3 3/3] xen: RCU: make the period of the idle timer adaptive.

2017-09-28 Thread Dario Faggioli
rlier next time). The goal is to let the period timer sefl-adjust to a number of 'misses', of the order of 1%. Signed-off-by: Dario Faggioli Suggested-by: George Dunlap Reviewed-by: Jan Beulich --- Cc: Julien Grall Cc: Andrew Cooper Cc: George Dunlap Cc: Stefano Stabellini , Cc: Tim

[Xen-devel] [PATCH v3 2/3] xen: RCU: make the period of the idle timer configurable.

2017-09-28 Thread Dario Faggioli
10, 4 or 1 ms. Default valus (used when this parameter is not specified) is 10ms. Maximum is 100ms. Signed-off-by: Dario Faggioli --- Cc: Jan Beulich Cc: Julien Grall Cc: Andrew Cooper Cc: George Dunlap Cc: Stefano Stabellini , Cc: Tim Deegan --- Changes from v2: - use '!= 0

Re: [Xen-devel] [PATCH v3 15/15] docs: add MBA description in docs

2017-09-28 Thread Dario Faggioli
g to a whitepaper or in general a place where a full description of the solution can be found), or it's probably better to drop the 'close-loop' reference, and explain how MBA can be useful in another way. Regards, Dario -- <> (Raistlin Majere) - Dario Faggioli, Ph.D,

Re: [Xen-devel] [PATCH v3 14/15] tools: implement new generic set value interface and MBA set value command

2017-09-28 Thread Dario Faggioli
URE. > ...this is just my opinion (as one of the ones which was part of that effort, and that plans to get back to finish it at some point). You're the maintainer, your rules. :-P :-D Regards, Dario -- <> (Raistlin Majere)

Re: [Xen-devel] RT-Xen on ARM

2017-09-28 Thread Dario Faggioli
giving d2v0 and d2v1 budget and period of 80ms and 100ms, respectively, will result in a schedulable system, even though you have 2 CPUs, and 2/10+2/10+80/100+80/100=2 (for Meng, I'm talking in general, about the fact that, under gEDF, with M CPUs, U> (Raistlin Majere) -

Re: [Xen-devel] [PATCH v2 2/3] xen: RCU: make the period of the idle timer configurable.

2017-09-28 Thread Dario Faggioli
r_period_ms now isn't > really needed outside of this function. I'd prefer if you moved it > and the integer_param() into this function, to limit their scopes > as much as possible. > Ok. idle_timer_period_ms still wants to go into __initdata, right? Regards, Dario -- <> (R

Re: [Xen-devel] [PATCH v2 1/3] xen: RCU: let the RCU idle timer handler run

2017-09-28 Thread Dario Faggioli
ne, where you pass it a cached value of NOW(). But I don't feel like arguing too much about this (especially now that this is patch is the only use case). If the problem is "just" the parameter (or maybe both the parameter's and the function's) name(s), I 'd be

[Xen-devel] [PATCH v2 0/3] xen: RCU: Improve the idle timer handling

2017-09-28 Thread Dario Faggioli
Thanks and Regards, Dario --- Dario Faggioli (3): xen: RCU: let the RCU idle timer handler run xen: RCU: make the period of the idle timer configurable. xen: RCU: make the period of the idle timer adaptive. docs/misc/xen-command-line.markdown | 10 + xen/common/rcupda

[Xen-devel] [PATCH v2 2/3] xen: RCU: make the period of the idle timer configurable.

2017-09-28 Thread Dario Faggioli
10, 4 or 1 ms. Default valus (used when this parameter is not specified) is 10ms. Maximum is 100ms. Signed-off-by: Dario Faggioli --- Cc: Jan Beulich Cc: Julien Grall Cc: Andrew Cooper Cc: George Dunlap Cc: Stefano Stabellini , Cc: Tim Deegan --- Changes from v1: - "-" instead of

[Xen-devel] [PATCH v2 3/3] xen: RCU: make the period of the idle timer adaptive.

2017-09-28 Thread Dario Faggioli
rlier next time). The goal is to let the period timer sefl-adjust to a number of 'misses', of the order of 1%. Signed-off-by: Dario Faggioli Suggested-by: George Dunlap --- Cc: Jan Beulich Cc: Julien Grall Cc: Andrew Cooper Cc: George Dunlap Cc: Stefano Stabellini , Cc: Tim De

[Xen-devel] [PATCH v2 1/3] xen: RCU: let the RCU idle timer handler run

2017-09-28 Thread Dario Faggioli
handle the TIMER_SOFTIRQ (which will perform the timer deactivation and run its handler). Signed-off-by: Dario Faggioli --- Cc: Andrew Cooper Cc: George Dunlap Cc: Jan Beulich Cc: Stefano Stabellini Cc: Julien Grall Cc: Tim Deegan --- Changes from v1: - logic changed completely: instead o

Re: [Xen-devel] [PATCH 1/3] xen: timers: don't miss a timer event because of stop_timer()

2017-09-28 Thread Dario Faggioli
On Wed, 2017-09-27 at 15:39 +0200, Dario Faggioli wrote: > On Wed, 2017-09-27 at 04:30 -0600, Jan Beulich wrote: > >  Or wait - > > wouldn't all you need be to avoid calling stop_timer() in the > > call tree above, if the timer's expiry has passed (suitably > >

Re: [Xen-devel] Guest start issue on ARM (maybe related to Credit2) [Was: Re: [xen-unstable test] 113807: regressions - FAIL]

2017-09-28 Thread Dario Faggioli
g nature and the fact that these CPUs are slow-- Dom0 is slow in dealing with the backends, to the point that OSSTest times out. Then, after the "load spike", everything goes back to normal, the system is responsive, the logs (like the runqueue dump you posted) depicts a normal semi-idle sys

Re: [Xen-devel] [PATCH RFC v2] Add SUPPORT.md

2017-09-27 Thread Dario Faggioli
On Wed, 2017-09-27 at 08:57 -0400, Robert VanVossen wrote: > On 9/26/2017 3:12 AM, Dario Faggioli wrote: > > [Cc-list modified by removing someone and adding someone else] > > > > Actually, the best candidate for gaining security support, is IMO > > ARINC. Code is als

Re: [Xen-devel] [PATCH 1/3] xen: timers: don't miss a timer event because of stop_timer()

2017-09-27 Thread Dario Faggioli
For the reason stated above, I addressed the problem at the generic code level. If that doesn't fly, I'll do like this. I had thought about that, and although I haven't tried, I think it works for this case. Thanks and Regards, Dario -- <> (Raistlin Majere) ---

Re: [Xen-devel] [PATCH 2/2] python/libxc: extend the call to get/set cap for credit2

2017-09-27 Thread Dario Faggioli
e often that I would want to. :-( I'll try to be more careful. > Signed-off-by: Wei Liu > --- > Cc: George Dunlap > Cc: Dario Faggioli > Cc: Marek Marczykowski-Górecki > FWIW: Reviewed-by: Dario Faggioli Regards, Dario -- <> (Raistlin Majere) --

Re: [Xen-devel] [PATCH 1/2] xen/credit2: add missing unlock

2017-09-27 Thread Dario Faggioli
n/common/sched_credit2.c > @@ -2831,6 +2831,7 @@ csched2_dom_cntl( >  if ( op->u.credit2.cap > 100 * sdom->nr_vcpus ) >  { >  rc = -EINVAL; > +write_unlock_irqrestore(&prv->lock, flags); > Indeed... :-/ Reviewed-b

Re: [Xen-devel] [PATCH 1/3] xen: timers: don't miss a timer event because of stop_timer()

2017-09-27 Thread Dario Faggioli
he first, and for now only, timer that is stopped on the CPU wake-up-from-idle path). It is important (in the new version of this patch) for deactivation to be skipped only in stop_timer(), and not, e.g., in kill_timer(). As, if someone, in future, will want to kill and free the timer during the wind

Re: [Xen-devel] Guest start issue on ARM (maybe related to Credit2) [Was: Re: [xen-unstable test] 113807: regressions - FAIL]

2017-09-26 Thread Dario Faggioli
On Tue, 2017-09-26 at 18:28 +0100, Julien Grall wrote: > On 09/26/2017 08:33 AM, Dario Faggioli wrote: > > > > > Here's the logs: > > http://logs.test-lab.xenproject.org/osstest/logs/113816/test-armhf- > > armhf-xl-rtds/info.html > > It does not seem to b

Re: [Xen-devel] [PATCH 1/3] xen: timers: don't miss a timer event because of stop_timer()

2017-09-26 Thread Dario Faggioli
Yes, personally, I think that, whenever it is that we figure out that we missed handling a timer interrupt, we should run it then. Unfortunately, for achieving this, e.g., in the set_timer() case, I don't see much alternatives to call execute_timer() right in there. But that would violate

Re: [Xen-devel] [PATCH 3/3] xen: RCU: make the period of the idle timer adaptive.

2017-09-26 Thread Dario Faggioli
 } > > Pointless braces. And do you really need min_t()/max_t() here, > rather than just min()/max()? > I probably can. This must be a leftover from a version when the time of idle_timer_period, and of the IDLE_TIMER_PERIOD_{MIN,MAX} constants wasn't matching. Sorry! Dario -- &l

Re: [Xen-devel] [PATCH 2/3] xen: RCU: make the period of the idle timer configurable.

2017-09-26 Thread Dario Faggioli
d be > a rather bad choice? > Indeed I should enforce a meaningful min too (I'll take it from patch 3 and put it here). > Also can you please switch to - as the separator in the command > line argument name? > Ah, ok. Thanks and Regards, Dario -- <> (Raistlin Majere) --

Re: [Xen-devel] Guest start issue on ARM (maybe related to Credit2) [Was: Re: [xen-unstable test] 113807: regressions - FAIL]

2017-09-26 Thread Dario Faggioli
On Mon, 2017-09-25 at 17:23 +0100, Julien Grall wrote: > On 09/25/2017 03:07 PM, Dario Faggioli wrote: > > I don't see much in the logs, TBH, but both `xl vcpu-list' and the > > 'r' > > debug key seem to suggest that vCPU 0 is running, while the other >

Re: [Xen-devel] [PATCH RFC v2] Add SUPPORT.md

2017-09-26 Thread Dario Faggioli
gaining security support, is IMO ARINC. Code is also rather simple and "stable" (hasn't changed in the last... years!) and it's used by DornerWorks' people for some of their projects (I think?). It's also not tested in OSSTest, though, and considering how special pu

Re: [Xen-devel] Guest start issue on ARM (maybe related to Credit2) [Was: Re: [xen-unstable test] 113807: regressions - FAIL]

2017-09-25 Thread Dario Faggioli
On Mon, 2017-09-25 at 17:23 +0100, Julien Grall wrote: > On 09/25/2017 03:07 PM, Dario Faggioli wrote: > > Hey, > > Hi Dario, > Hi! > > I don't see much in the logs, TBH, but both `xl vcpu-list' and the > > 'r' > > debug key seem to s

Re: [Xen-devel] [PATCH] Config.mk: update OVMF changeset

2017-09-25 Thread Dario Faggioli
e need? > What we have right now, does not build, e.g., with gcc 7.2: https://pastebin.com/xgeJHkdL Which, I agree, should be mentioned/hinted at in the changelog. Regards, Dario -- <> (Raistlin Majere) ----- Dario Faggioli, P

[Xen-devel] Guest start issue on ARM (maybe related to Credit2) [Was: Re: [xen-unstable test] 113807: regressions - FAIL]

2017-09-25 Thread Dario Faggioli
ubietruck/xen-unstable So... ARM people? Does this ring any bell? Is this something known, or easy to explain? What can I do for help? Regards, Dario -- <> (Raistlin Majere) ----- Dario Faggioli, Ph.D, http://about.me/dario.faggiol

[Xen-devel] [PATCH v3] xen: credit2: fix spinlock irq-safety violation

2017-09-20 Thread Dario Faggioli
tions, when IRQs are enabled. Signed-off-by: Dario Faggioli --- Cc: osstest service owner Cc: George Dunlap Cc: Wei Liu Cc: Roger Pau Monné Cc: Jan Beulich --- This was spotted by OSSTest's flight 113562: http://logs.test-lab.xenproject.org/osstest/logs/113562/ http://logs.test-lab.xe

Re: [Xen-devel] [PATCH] xen: credit2: fix spinlock irq-safety violation

2017-09-20 Thread Dario Faggioli
I'll send a patch for that Thanks and Regards, Dario -- <> (Raistlin Majere) - Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd

Re: [Xen-devel] [PATCH] xen: credit2: fix spinlock irq-safety violation

2017-09-20 Thread Dario Faggioli
7;t > anticipate the budget replenishment ever to need to walk the domain > list, but should that change, this would be a bear of a bug to find. > Indeed it's rather unlikely for the replenishment handler to have to use sdom_elem to go through the list of domains. IAC, if you're conce

Re: [Xen-devel] [PATCH v2 2/5] libxl: enable per-VCPU extratime flag for RTDS

2017-09-19 Thread Dario Faggioli
On Fri, 2017-09-15 at 12:01 -0400, Meng Xu wrote: > On Wed, Sep 13, 2017 at 8:16 PM, Dario Faggioli > wrote: > > > > > I'm ok with what it is in this patch, although I feel that we can > > > kill the > > >  if (scinfo->extratime != > > > L

Re: [Xen-devel] How to prepare the COLO test environment

2017-09-19 Thread Dario Faggioli
wledge to update it, then fine. But, technically, the Wiki can be updated and, if possible, it should be. Regards, Dario -- <> (Raistlin Majere) - Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senio

Re: [Xen-devel] [PATCH 0/4] xen: sched: optimize exclusive pinning and soft-affinity checking

2017-09-19 Thread Dario Faggioli
On Mon, 2017-09-18 at 20:42 +0100, Anshul Makkar wrote: > > On 9/15/17 6:35 PM, Dario Faggioli wrote: > > Hello, > > > > Dario Faggioli (4): > >    xen: sched: introduce 'adjust_affinity' hook. > >    xen: sched: optimize exclusive pi

[Xen-devel] [PATCH] xen: credit2: fix spinlock irq-safety violation

2017-09-18 Thread Dario Faggioli
tions, when IRQs are enabled. Signed-off-by: Dario Faggioli --- Cc: osstest service owner Cc: George Dunlap Cc: Wei Liu --- This was spotted by OSSTest's flight 113562: http://logs.test-lab.xenproject.org/osstest/logs/113562/ http://logs.test-lab.xenproject.org/osstest/logs/113562/te

Re: [Xen-devel] [xen-unstable test] 113562: regressions - FAIL

2017-09-18 Thread Dario Faggioli
being inside the critical section (which > disables > irqs); there's actually an xfree() right in that function outside the > critical section. > So, during the afternoon, there was an glitch here, in the local network/NAS of my home office. It took me a bit to fix it, and that

[Xen-devel] [PATCH 1/3] xen: timers: don't miss a timer event because of stop_timer()

2017-09-15 Thread Dario Faggioli
timers stopped during the wakeup from idle (e.g., C-states, on x86) path. To fix that, don't deactivate a timer, while stopping it, if it has expired. On the contrary, when that happens, (re-)raise the timer softirq, to make sure the handler is invoked. Signed-off-by: Dario Faggioli --- Cc: A

[Xen-devel] [PATCH 2/3] xen: RCU: make the period of the idle timer configurable.

2017-09-15 Thread Dario Faggioli
10, 4 or 1 ms. Default valus (used when this parameter is not specified) is 10ms. Maximum is 100ms. Signed-off-by: Dario Faggioli --- Cc: Jan Beulich Cc: Julien Grall Cc: Andrew Cooper Cc: George Dunlap Cc: Stefano Stabellini , Cc: Tim Deegan --- docs/misc/xen-command-line.markdown |9

[Xen-devel] [PATCH 0/3] xen: RCU: Improve the idle timer handling

2017-09-15 Thread Dario Faggioli
this series, as, without it, the RCU idle timer handler is never run (and hence, George's algorithm can't work :-/). Regards, Dario --- Dario Faggioli (3): xen: timers: don't miss a timer event because of stop_timer() xen: RCU: make the period of the idle timer configurable.

[Xen-devel] [PATCH 3/3] xen: RCU: make the period of the idle timer adaptive.

2017-09-15 Thread Dario Faggioli
rlier next time). The goal is to let the period timer sefl-adjust to a number of 'misses', of the order of 1%. Signed-off-by: Dario Faggioli Suggested-by: George Dunlap --- Cc: Jan Beulich Cc: Julien Grall Cc: Andrew Cooper Cc: George Dunlap Cc: Stefano Stabellini , Cc: Tim Deegan -

[Xen-devel] [PATCH 4/4] xen: sched: simplify (and speedup) checking soft-affinity

2017-09-15 Thread Dario Faggioli
line pCPUs and/or of what pCPUs are part of the cpupool where the vCPU lives, and that's rather impractical to store in a per-vCPU flag. Still the overhead is reduced to "just" one cpumask_subset() (and only if the newly introduced flag is 'true')! Signed-off-by: Dario

[Xen-devel] [PATCH 2/4] xen: sched: optimize exclusive pinning case (Credit1 & 2)

2017-09-15 Thread Dario Faggioli
enough, so go for it. Signed-off-by: Dario Faggioli --- Cc: George Dunlap Cc: Anshul Makkar --- Changes from v1: - use a flag during runtime, as suggested during review; - make use of the affinity-change hook, introduced in pevious patch. --- xen/common/sched_credit.c| 35

[Xen-devel] [PATCH 0/4] xen: sched: optimize exclusive pinning and soft-affinity checking

2017-09-15 Thread Dario Faggioli
necessary to make the other twos possible. Regards, Dario --- Dario Faggioli (4): xen: sched: introduce 'adjust_affinity' hook. xen: sched: optimize exclusive pinning case (Credit1 & 2) xen: sched: improve checking soft-affinity xen: sched: simplify (and spe

[Xen-devel] [PATCH 3/4] xen: sched: improve checking soft-affinity

2017-09-15 Thread Dario Faggioli
h the only exception _csched_cpu_pick() (in Credit1 code). Signed-off-by: Dario Faggioli --- Cc: George Dunlap Cc: Anshul Makkar --- xen/common/sched_credit.c | 79 +--- xen/common/sched_credit2.c | 10 ++ xen/common/sched_null.c|8 ++-- xen/i

[Xen-devel] [PATCH 1/4] xen: sched: introduce 'adjust_affinity' hook.

2017-09-15 Thread Dario Faggioli
tions that, despite the fact that they rarely change, are right now checked very frequently, even in hot paths. Note also that this, in future, may turn out as a useful mean for, e.g., having the schedulers vet, ack or nack the changes themselves. Signed-off-by: Dario Faggioli --- Cc: George Dunlap

Re: [Xen-devel] [PATCH 3/3] credit2: xen related changes to add support for runqueue per cpupool.

2017-09-14 Thread Dario Faggioli
INE_XEN_GUEST_HANDLE(xen_sysctl_credit_schedule_t); > - > -struct xen_sysctl_credit2_schedule { > -    unsigned ratelimit_us; > -}; > -typedef struct xen_sysctl_credit2_schedule > xen_sysctl_credit2_schedule_t; > -DEFINE_XEN_GUEST_HANDLE(xen_sysctl_credit2_schedule_t); >

Re: [Xen-devel] [PATCH 1/3] credit2: libxc related changes to add support for runqueue per cpupool.

2017-09-14 Thread Dario Faggioli
e with this patch at the front), this patch looks fine to me. Regards, Dario -- <> (Raistlin Majere) ----- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) sign

Re: [Xen-devel] [PATCH 1/3] credit2: libxc related changes to add support for runqueue per cpupool.

2017-09-14 Thread Dario Faggioli
am_t param; > >   > >  static char *kwd_list[] = { "pool", "sched", NULL }; > > [..] > Another possibility would be to drop the cpupool python bindings > completely (which I would prefer, TBH). > +1 Regards, Dario -- <> (Raistlin Majere)

Re: [Xen-devel] [PATCH v2 1/5] xen:rtds: towards work conserving RTDS

2017-09-13 Thread Dario Faggioli
>   > +static inline bool has_extratime(const struct rt_vcpu *svc) > +{ > +return (svc->flags & RTDS_extratime) ? 1 : 0; > +} > + 'true' and 'false'. But I think return svc->flags & RTDS_extratime is just fine already, without any need for the

Re: [Xen-devel] [PATCH v2 5/5] docs: enable per-VCPU extratime flag for RTDS

2017-09-13 Thread Dario Faggioli
On Fri, 2017-09-01 at 11:58 -0400, Meng Xu wrote: > Revise xl tool use case by adding -e option > Remove work-conserving from TODO list > > Signed-off-by: Meng Xu > Reviewed-by: Dario Faggioli Regards, Dario -- <

Re: [Xen-devel] [PATCH v2 3/5] xl: enable per-VCPU extratime flag for RTDS

2017-09-13 Thread Dario Faggioli
xl/xl_sched.c| 56 ++ > > Oh, and this patch must update docs/man/xl.pod.1.in as well. Dario -- <> (Raistlin Majere) ----- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&

Re: [Xen-devel] [PATCH v2 4/5] xentrace: enable per-VCPU extratime flag for RTDS

2017-09-13 Thread Dario Faggioli
08x, cur_budget = 0x%(6)08x%(5)08x ] > Why 0x%(2)08d, and not just %(2)d ? Have you tested it? What does it print? Dario -- <> (Raistlin Majere) - Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer,

Re: [Xen-devel] [PATCH v2 3/5] xl: enable per-VCPU extratime flag for RTDS

2017-09-13 Thread Dario Faggioli
878,7 @@ int main_sched_rtds(int argc, char **argv) >         xmalloc(sizeof(libxl_sched_params)); >  scinfo.vcpus[0].period = periods[0]; >  scinfo.vcpus[0].budget = budgets[0]; > +scinfo.vcpus[0].extratime = extratimes[0] ? 1 : 0; > But does thes

Re: [Xen-devel] [PATCH v2 2/5] libxl: enable per-VCPU extratime flag for RTDS

2017-09-13 Thread Dario Faggioli
27;m ok with what it is in this patch, although I feel that we can > kill the >  if (scinfo->extratime != LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT) > because LIBXL_DOMAIN_SCHED_PARAM_EXTRATIME_DEFAULT is -1. > No, sorry, I don't understand what you mean here... Dario -- <> (Ra

Re: [Xen-devel] [PATCH v2 2/5] libxl: enable per-VCPU extratime flag for RTDS

2017-09-13 Thread Dario Faggioli
scinfo->vcpus[i].extratime = !!(vcpus[i].u.rtds.flags & XEN_DOMCTL_SCHEDRT_extra); Regards, Dario  -- <> (Raistlin Majere) - Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Syst

[Xen-devel] [PATCH] xen: Credit2: enable fully custom runqueue arrangement

2017-09-13 Thread Dario Faggioli
The patch introduces yet another runqueue arrangement option for Credit2. In fact, it allows the user to specify, explicitly and precisely, what pCPUs should belong to which runqueue. Signed-off-by: Dario Faggioli Signed-off-by: Praveen Kumar --- Cc: George Dunlap Cc: Praveen Kumar --- This

Re: [Xen-devel] [PATCH v2 0/5] Towards work-conserving RTDS

2017-09-13 Thread Dario Faggioli
gt; mechanical. > Yes, this is on my radar. I'll be able to look at it shortly. Dario -- <> (Raistlin Majere) ----- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd.,

Re: [Xen-devel] CONFIG_SCRUB_DEBUG=y + arm64 + livepatch = Xen BUG at page_alloc.c:738

2017-09-13 Thread Dario Faggioli
kes up, even on a totally idle system, while ARM doesn't. But this should not be a problem as, in both cases, if there's pages to scrub, the CPU just won't go to sleep. If frequent wakeups is what causes the scrubbing to work ok on the x86, and not on ARM, it IMO means that the

Re: [Xen-devel] [PATCH 1/2] public/domctl: drop unnecessary typedefs and handles

2017-09-12 Thread Dario Faggioli
pe, > - make x86's paging_domctl() and descendants take a properly typed >   handle, > - add const in a few places. > > Signed-off-by: Jan Beulich > Acked-by: Dario Faggioli Regards, Dario -- <> (Raistlin Majere) --------

Re: [Xen-devel] [PATCH 2/2] public/sysctl: drop unnecessary typedefs and handles

2017-09-12 Thread Dario Faggioli
On Tue, 2017-09-12 at 09:10 -0600, Jan Beulich wrote: > By virtue of the struct xen_sysctl container structure, most of them > are really just cluttering the name space. > > Signed-off-by: Jan Beulich > Acked-by: Dario Faggioli Regards, Dario -- <

Re: [Xen-devel] [PATCH RFC] Add SUPPORT.md

2017-09-12 Thread Dario Faggioli
step would be adding it to OSSTest, at which point, we can start to think about calling it supported. Dario -- <> (Raistlin Majere) - Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) signature.asc Descr

Re: [Xen-devel] Faulting linear address??

2017-09-11 Thread Dario Faggioli
help. > You being a beginner is not a problem. :-) The biggest problem I have right now, while trying to help you, is that I can't see what you are doing, and how you're changing the code. Regards, Dario -- <> (Raistlin Majere) - Dar

Re: [Xen-devel] Faulting linear address??

2017-09-08 Thread Dario Faggioli
le something > that human cannot read. > > I think, literally, the 'Faulting linear address' is key point > because I heard that it represents bad address that I should never > access. > It is, but the only way of understanding why you hit such an access violation, is underst

Re: [Xen-devel] [xen-unstable-smoke test] 112957: regressions - trouble: broken/fail/pass

2017-09-06 Thread Dario Faggioli
On Wed, 2017-09-06 at 12:29 -0700, Stefano Stabellini wrote: > On Wed, 6 Sep 2017, Dario Faggioli wrote: > > > > Or, in general, make sense out of the fact that the stack pointer > > register changes in such a way that, when we get back in > > do_softirq(), > >

Re: [Xen-devel] [PATCH v3 6/6] xen: try to prevent idle timer from firing too often.

2017-09-06 Thread Dario Faggioli
On Tue, 2017-08-29 at 17:30 +0100, George Dunlap wrote: > On 08/18/2017 07:04 PM, Dario Faggioli wrote: > > > > What we're trying to avoid is one of those idle CPUs to > > wake up, only to discover that the grace period is still > > running, and that it

Re: [Xen-devel] [xen-unstable-smoke test] 112957: regressions - trouble: broken/fail/pass

2017-09-06 Thread Dario Faggioli
On Tue, 2017-09-05 at 15:06 -0700, Stefano Stabellini wrote: > On Tue, 5 Sep 2017, Dario Faggioli wrote: > > > > Re-checking things now, I actually do see that context_switch() on > > ARM > > is not 'terminal'. It call schedule_tail(), which on x86 does not

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

2017-09-05 Thread Dario Faggioli
On Fri, 2017-06-09 at 18:41 +0200, Dario Faggioli wrote: > Hey Praveen, > Hey, hello again! > Here we are, sorry for the delay. > So, about this patch... I haven't seen a new version (or did I perhaps miss it?). I'm asking because I do have it half done myself, and it w

Re: [Xen-devel] [PATCH v2 1/4] xen: credit2: implement utilization cap

2017-09-05 Thread Dario Faggioli
On Thu, 2017-08-24 at 20:42 +0100, Anshul Makkar wrote: > On 8/18/17 4:50 PM, Dario Faggioli wrote: > >    > > @@ -1515,7 +1633,16 @@ static void reset_credit(const struct > > scheduler *ops, int cpu, s_time_t now, > >    * that the credit it has

Re: [Xen-devel] [PATCH v3 5/6] xen: RCU: avoid busy waiting until the end of grace period.

2017-09-05 Thread Dario Faggioli
> > +#define RCU_IDLE_TIMER_PERIOD MILLISECS(10) > > > > > > With you even mentioning that the original Linux code has ways > > > to use different values, wouldn't it be worth allowing this to be > > > command line controllable? > > > > Da

Re: [Xen-devel] [xen-unstable-smoke test] 112957: regressions - trouble: broken/fail/pass

2017-09-05 Thread Dario Faggioli
orrect? Also, mostly out of curiosity, still looking at ARM code, I'm not getting at all how continue_new_vcpu() works (e.g., when/how is it invoked?). Thanks and Regards, Dario -- <> (Raistlin Majere) - Dario Faggioli, Ph.D,

Re: [Xen-devel] [PATCH v2 1/6] xen: in do_softirq() sample smp_processor_id() once and for all.

2017-08-29 Thread Dario Faggioli
Il 29 Ago 2017 4:03 PM, George Dunlap ha scritto: On Wed, Aug 16, 2017 at 5:45 PM, Dario Faggioli wrote: > In fact, right now, we read it at every iteration of the loop. > The reason it's done like this is how context switch was handled > on IA64 (see commit ae9bfcdc, "[X

  1   2   3   4   5   6   7   8   9   10   >