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

Re: [Xen-devel] [PATCH 2/7] xen/tools: credit2: soft-affinity awareness in runq_tickle()



On 06/16/2017 03:13 PM, Dario Faggioli wrote:
> Soft-affinity support is usually implemented by means
> of a two step "balancing loop", where:
> - during the first step, we consider soft-affinity
>   (if the vcpu has one);
> - during the second (if we get to it), we consider
>   hard-affinity.
> 
> In runq_tickle(), we need to do that for checking
> whether we can execute the waking vCPU on an pCPU
> that is idle. In fact, we want to be sure that, if
> there is an idle pCPU in the vCPU's soft affinity,
> we'll use it.
> 
> If there are no such idle pCPUs, though, and we
> have to check non-idle ones, we can avoid the loop
> and to both hard and soft-affinity in one pass.
> 
> In fact, we can we scan runqueue and compute a
> "score" for each vCPU which is running on each pCPU.
> The idea is, since we may have to preempt someone:
> - try to make sure that the waking vCPU will run
>   inside its soft-affinity,
> - try to preempt someone that is running outside
>   of its own soft-affinity.
> 
> The value of the score is added to a trace record,
> so xenalyze's code and tools/xentrace/formats are
> updated accordingly.
> 
> Signed-off-by: Dario Faggioli <dario.faggioli@xxxxxxxxxx>
> ---
> Cc: George Dunlap <george.dunlap@xxxxxxxxxx>
> Cc: Anshul Makkar <anshul.makkar@xxxxxxxxxx>
> Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> Cc: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
> This is *very* different from what was first submitted here:
>  https://lists.xenproject.org/archives/html/xen-devel/2016-08/msg02200.html
> 
> In fact, I reworked it starting from George's idea and draft:
>  https://lists.xenproject.org/archives/html/xen-devel/2016-09/msg03171.html
> 
> But then ended up changing that quite a bit as well. So, George, I'm more than
> happy for this patch to have a 'Signed-off-by: George Dunlap', and in fact, I
> had it here until 5 minutes before actually sending the series.
> 
> But since I altered the code significantly, I could not be sure you'd be happy
> about that, and hence decided to remove it, and ask you. Are you ok with it, 
> or
> maybe you prefer some other tag (stuff like 'Idea-by:', etc.). Let me know. 
> :-)

Haha -- actually, I'd completely forgotten that I'd suggested that; and
after reviewing it (but before seeing your comment here), I was going to
say I thought using a 'score' was a really good idea. :-)

I think "Suggested-by" would be fine here; the point of sending you a
patch wasn't to use actual code, but to 1) make sure the idea wasn't
crazy, and 2) concisely describe what my idea was.

I can added that and the following on check-in, depending on what we
decide about patch 3:

Reviewed-by: George Dunlap <george.dunlap@xxxxxxxxxx>

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

 


Rackspace

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