[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B621213.2010805@austin.ibm.com>
Date: Thu, 28 Jan 2010 16:39:15 -0600
From: Joel Schopp <jschopp@...tin.ibm.com>
To: Benjamin Herrenschmidt <benh@...nel.crashing.org>
CC: Peter Zijlstra <a.p.zijlstra@...llo.nl>, ego@...ibm.com,
linuxppc-dev@...ts.ozlabs.org, Ingo Molnar <mingo@...e.hu>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2 2/2] powerpc: implement arch_scale_smt_power for Power7
>
> What about an early exit if !cpu_has_feature(CPU_FTR_SMT) ? That would
> de-facto compile it out for 32-bit CPU platforms that don't support SMT
> at all and avoid some overhead on POWER3,4,970...
>
If the SD_SHARE_CPUPOWER flag isn't set for the sched domain this
function isn't called. So an extra check here is wasteful.
>
>> + unsigned long weight = cpumask_weight(sibling_map);
>> + unsigned long smt_gain = sd->smt_gain;
>> +
>> + if (cpu_has_feature(CPU_FTR_ASYNC_SMT4) && weight == 4) {
>>
>
> So that will only handle the case where all 4 threads are online right ?
> There is no provision for the case where the user play tricks like
> offlining thread, in which case it will stop trying to "push down"
> processes right ? Not a big deal per-se I suppose, just something to be
> aware of.
>
I've tested it with manually offlined threads and it behaves as I'd like
it to.
> Also, can you add a comment as to why this is done in the code itself ?
> above the if (cpu_has_feature(...)) statement.
>
OK. v3 coming soon with the comment.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists