Re: [PATCH v7 8/8] x86/tlb: just do tlb flush on one ofsiblings of SMT

From: Jan Beulich
Date: Thu May 24 2012 - 05:45:07 EST


>>> On 24.05.12 at 11:02, Alex Shi <alex.shi@xxxxxxxxx> wrote:

>>>
>>> I just measured the cost of this function on my Romely EP(32 LCPUs) with
>>> cpumask_t and NR_CPUS = 32/256/512/4096, the cost are similar with
>>> 256/512/4096 and that increased about 20% time cost from 32.
>>>
>>> I also tried to use cpumask_var_t and alloc it in heap(use
>>> CPUMASK_OFFSTACK), actually, it cost same time with cpumask_t in stack.
>>> But, the allocation bring another big cost. So, I use cpumask_t in stack.
>>> The performance gain data in commit log is getting with NR_CPUS = 256.
>>
>> Perhaps using a per-CPU cpumask would be the better choice here
>
>
> See.
>
>> (I can't see how preemption could validly be enabled when this
>> code is utilized).
>
>
> Sorry, What's your meaning here?, the function is always in pre-empt
> safe mode.

That's exactly what I implied (I was merely pointing this out to
prove that using per-CPU data here is possible).

Jan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/