`On Fri, 2010-04-16 at 15:58 +0200, Peter Zijlstra wrote:> > > Hrmm, my brain seems muddled but I might have another solution, let me> ponder this for a bit..> Right, so the thing I was thinking about is taking the group capacityinto account when determining the capacity for a single cpu.Say the group contains all the SMT siblings, then use the group capacity(usually larger than 1024) and then distribute the capacity over thegroup members, preferring CPUs with higher individual cpu_power overthose with less.So suppose you've got 4 siblings with cpu_power=294 each, then we assigncapacity 1 to the first member, and the remaining 153 is insufficient,and thus we stop and the rest lives with 0 capacity.Now take the example that the first sibling would be running a heavy RTload, and its cpu_power would be reduced to say, 50, then we still gotnearly 933 left over the others, which is still sufficient for onecapacity, but because the first sibling is low, we'll assign it 0 andinstead assign 1 to the second, again, leaving the third and fourth 0.If the group were a core group, the total would be much higher and we'dlikely end up assigning 1 to each before we'd run out of capacity.For power savings, we can lower the threshold and maybe use the maximalindividual cpu_power in the group to base 1 capacity from.So, suppose the second example, where sibling0 has 50 and the othershave 294, you'd end up with a capacity distribution of: {0,1,1,1}.`