Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-13 Thread Justin Weaver
Dario, >> Without the processor assignment >> here the vcpu might go on being assigned to a processor it no longer >> is allowed to run on. >> > Ok. > >> In that case, function runq_candidate may only >> get called for the vcpu's old processor, and runq_candidate will no >> longer let a vcpu run o

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-13 Thread Dario Faggioli
Hey, I came across this patch again for other reasons, and I realized I've a few more (minor) comments: On Sun, 2015-02-08 at 17:45 -1000, Justin T. Weaver wrote: > From: "Justin T. Weaver" > diff --git a/xen/common/sched_credit2.c b/xen/common/sched_credit2.c > index cf53770..de8fb5a 100644 > -

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-10 Thread Dario Faggioli
On Sun, 2015-03-08 at 21:11 -1000, Justin Weaver wrote: > Thanks to all for the comments! I've implemented most of the changes > recommended here in the v2 review. I should have a new patch set ready > this week (with an updated soft affinity patch as well). > Great! :-) > > Oh, and this is what

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-09 Thread Dario Faggioli
On Mon, 2015-03-09 at 11:45 +, George Dunlap wrote: > On 03/09/2015 07:11 AM, Justin Weaver wrote: > > I don't think there's any way the mask can be empty after the > > cpumask_and with the cpu_hard_affinity and the VCPU2ONLINE. In > > schedule.c:vcpu_set_hard_affinity, if the intersection of

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-09 Thread George Dunlap
On 03/09/2015 07:11 AM, Justin Weaver wrote: > +static int get_safe_pcpu(struct csched2_vcpu *svc) > +{ > I also don't like the name... __choose_cpu() maybe ? >>> >>> I'm not 100% happy with the name, but I think "get_safe_pcpu" is more >>> descriptive than just "__choose_cpu". >>>

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-09 Thread Justin Weaver
Thanks to all for the comments! I've implemented most of the changes recommended here in the v2 review. I should have a new patch set ready this week (with an updated soft affinity patch as well). I'll just address the comments where you asked for my feedback... >> rqd_avgload = rqd->

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-06 Thread Dario Faggioli
On Fri, 2015-03-06 at 15:18 +, George Dunlap wrote: > On 03/03/2015 03:15 AM, Dario Faggioli wrote: > > On Sun, 2015-02-08 at 17:45 -1000, Justin T. Weaver wrote: > >> /* > >> + * Use this to avoid having too many cpumask_t structs on the stack > >> + */ > >> +static cpumask_t **cpumask = NUL

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-06 Thread George Dunlap
On 03/03/2015 03:15 AM, Dario Faggioli wrote: > On Sun, 2015-02-08 at 17:45 -1000, Justin T. Weaver wrote: >> From: "Justin T. Weaver" >> >> by making sure that vcpus only run on the pcpu(s) they are allowed to >> run on based on their hard affinity cpu masks. >> > Ok, here I am reviewing this, at

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-04 Thread Jan Beulich
>>> On 04.03.15 at 14:08, wrote: > On Wed, 2015-03-04 at 12:50 +, Jan Beulich wrote: >> >>> On 04.03.15 at 12:03, wrote: >> > I see the point you're making, and I can live with _choose_cpu(), but >> > the result would look a bit inconsistent, IMO. >> >> I'm tempted to ask for a cleanup patch

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-04 Thread Dario Faggioli
On Wed, 2015-03-04 at 12:50 +, Jan Beulich wrote: > >>> On 04.03.15 at 12:03, wrote: > > I see the point you're making, and I can live with _choose_cpu(), but > > the result would look a bit inconsistent, IMO. > > I'm tempted to ask for a cleanup patch then. > Yep, and I'd be fine with that.

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-04 Thread Jan Beulich
>>> On 04.03.15 at 12:03, wrote: > I see the point you're making, and I can live with _choose_cpu(), but > the result would look a bit inconsistent, IMO. I'm tempted to ask for a cleanup patch then. Jan ___ Xen-devel mailing list Xen-devel@lists.xen.

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-04 Thread Dario Faggioli
On Tue, 2015-03-03 at 09:12 +, Jan Beulich wrote: > >>> On 03.03.15 at 04:15, wrote: > > On Sun, 2015-02-08 at 17:45 -1000, Justin T. Weaver wrote: > >> +#define csched2_cpumask cpumask[smp_processor_id()] > >> + > > I like the idea, but put the right side between parentheses. > > Parenthese

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-03 Thread Jan Beulich
>>> On 03.03.15 at 04:15, wrote: > On Sun, 2015-02-08 at 17:45 -1000, Justin T. Weaver wrote: >> --- a/xen/common/sched_credit2.c >> +++ b/xen/common/sched_credit2.c >> @@ -194,6 +194,12 @@ int opt_overload_balance_tolerance=-3; >> integer_param("credit2_balance_over", opt_overload_balance_tolera

Re: [Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-03-02 Thread Dario Faggioli
On Sun, 2015-02-08 at 17:45 -1000, Justin T. Weaver wrote: > From: "Justin T. Weaver" > > by making sure that vcpus only run on the pcpu(s) they are allowed to > run on based on their hard affinity cpu masks. > Ok, here I am reviewing this, at last... sorry for the delay! :-( > Signed-off-by: J

[Xen-devel] [PATCH v2] sched: credit2: respect per-vcpu hard affinity

2015-02-08 Thread Justin T. Weaver
From: "Justin T. Weaver" by making sure that vcpus only run on the pcpu(s) they are allowed to run on based on their hard affinity cpu masks. Signed-off-by: Justin T. Weaver --- Changes in v2: * Added dynamically allocated cpu masks to avoid putting them on the stack; replaced temp masks fr