|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] xen: if on Xen, "flatten" the scheduling domain hierarchy
On 08/20/2015 02:16 PM, Juergen Groà wrote: On 08/18/2015 05:55 PM, Dario Faggioli wrote:Hey everyone, So, as a followup of what we were discussing in this thread: [Xen-devel] PV-vNUMA issue: topology is misinterpreted by the guest http://lists.xenproject.org/archives/html/xen-devel/2015-07/msg03241.html I started looking in more details at scheduling domains in the Linux kernel. Now, that thread was about CPUID and vNUMA, and their weird way of interacting, while this thing I'm proposing here is completely independent from them both. In fact, no matter whether vNUMA is supported and enabled, and no matter whether CPUID is reporting accurate, random, meaningful or completely misleading information, I think that we should do something about how scheduling domains are build. Fact is, unless we use 1:1, and immutable (across all the guest lifetime) pinning, scheduling domains should not be constructed, in Linux, by looking at *any* topology information, because that just does not make any sense, when vcpus move around. Let me state this again (hoping to make myself as clear as possible): no matter in how much good shape we put CPUID support, no matter how beautifully and consistently that will interact with both vNUMA, licensing requirements and whatever else. It will be always possible for vCPU #0 and vCPU #3 to be scheduled on two SMT threads at time t1, and on two different NUMA nodes at time t2. Hence, the Linux scheduler should really not skew his load balancing logic toward any of those two situations, as neither of them could be considered correct (since nothing is!). For now, this only covers the PV case. HVM case shouldn't be any different, but I haven't looked at how to make the same thing happen in there as well. OVERALL DESCRIPTION =================== What this RFC patch does is, in the Xen PV case, configure scheduling domains in such a way that there is only one of them, spanning all the pCPUs of the guest. Note that the patch deals directly with scheduling domains, and there is no need to alter the masks that will then be used for building and reporting the topology (via CPUID, /proc/cpuinfo, /sysfs, etc.). That is the main difference between it and the patch proposed by Juergen here:http://lists.xenproject.org/archives/html/xen-devel/2015-07/msg05088.html If set_cpu_sibling_map()'s has_mp is false, wouldn't we effectively have both of your patches? Also, it seems to me that Xen guests would not be the only ones having to deal with topology inconsistencies due to migrating VCPUs. Don't KVM guests, for example, have the same problem? And if yes, perhaps we should try solving it in non-Xen-specific way (especially given that both of those patches look pretty simple and thus are presumably easy to integrate into common code). And, as George already pointed out, this should be an optional feature --- if a guest spans physical nodes and VCPUs are pinned then we don't always want flat topology/domains. -boris I still believe making the guest scheduler's decisions independant from cpuid values is the way to go, as this will enable us to support more scenarios (e.g. cpuid based licensing). For HVM guests and old PV guests mangling the cpuid should still be done, though. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |