David Gibson <da...@gibson.dropbear.id.au> writes: >> >> I thought, I am doing the same here for PowerNV, number of online cores >> is equal to initial online vcpus / threads per core >> >> int boot_cores_nr = smp_cpus / smp_threads; >> >> Only difference that I see in PowerNV is that we have multiple chips >> (max 2, at the moment) >> >> cores_per_chip = smp_cpus / (smp_threads * pnv->num_chips); > > This doesn't make sense to me. Cores per chip should *always* equal > smp_cores, you shouldn't need another calculation for it. > >> And in case user has provided sane smp_cores, we use it. > > If smp_cores isn't sane, you should simply reject it, not try to fix > it. That's just asking for confusion.
This is the case where the user does not provide a topology(which is a valid scenario), not sure we should reject it. So qemu defaults smp_cores/smt_threads to 1. I think it makes sense to over-ride. Regards Nikunj