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

Re: [Xen-devel] [PATCH] xen/sched: fix credit2 smt idle handling



On Sat, 2019-03-23 at 03:32 +0100, Dario Faggioli wrote:
> On Fri, 2019-03-22 at 10:04 +0100, Juergen Gross wrote:
> > This problem can be solved by and-ing the core's sibling cpumask
> > with
> > the runqueue's active mask before doing the idle test.
> > 
> 
> Therefore, I'm a bit reluctant at adding another cpumask bitwise
> operation, in hot paths, just for taking care of it.
> 
> Note that this also applies to cpupools, i.e., I also consider a very
> poor choice putting two sibling hyperthreads in different pools. If
> you
> recall, I even sent a patch to forbid doing that (which is still
> blocked on a series of yours for passing parameters from the tools to
> the hypervisor).
> 
> The only case I care, is a CPU being off-lined.
> 
> So, one thing that we could do is to put credit2_runqueue=cpu inside
> such #ifdef-s too (and I can prepare a patch to that effect myself,
> if
> you want).
> 
> To properly deal with offline CPUs, I think we can change the logic a
> little, i.e., we initialize the smt_idle mask to all-1 (all CPUs
> idle),
> and we also make sure that we set the CPU bit (instead of learing it)
> in smt_idle, when we remove the CPU from the scheduler.
> 
Which, thinking more about this, should also serve as a solution for
the issue addressed by this patch.

We need to check whether all the other places where smt_idle is used
would be ok with that (I think they are, as we pretty much always end
up &&-ing it with online or active anyway), or if they need some
reshuffling (and if yes, how that looks like).

I can check this on Monday.

Regards,
Dario
-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Software Engineer @ SUSE https://www.suse.com/

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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