Messages in this thread | | | Date | Thu, 24 May 2012 22:03:50 +0800 | From | Alex Shi <> | Subject | Re: [PATCH v7 8/8] x86/tlb: just do tlb flush on one of siblings of SMT |
| |
On 05/24/2012 07:35 PM, Rusty Russell wrote:
> On Thu, 24 May 2012 16:48:37 +0800, Alex Shi <alex.shi@intel.com> wrote: >> On 05/24/2012 04:42 PM, Peter Zijlstra wrote: >> >>> On Thu, 2012-05-24 at 16:32 +0800, Alex Shi wrote: >>>> So, I use cpumask_t in stack. >>> >>> cpumask_t is 512 bytes with NR_CPUS=4096, that's generally considered >>> too big to be on stack. >>> >>> A number of people spend a lot of time removing cpumask_t from stacks a >>> while ago, I'm very sure they'll not be happy if you're going to add it >>> back. >> >> >> In my testing, allocate a cpumask_var_t is more worse than cpumask_t. >> So, another choice is using percpu pre-allocatd cpumask for this, but I >> am wondering if it is acceptable. What's suggestion for this point? > > Thanks for the ping Peter! > > Please don't use cpus_ operations: they're deprecated. Use cpumask_. > Similarly, avoid cpumask_t.
Thanks, Rusty and Peter!
> > And yes, if you configure for thousands of CPUs, it's not free! If it's > a significant, you will want to use a per-cpu cpumask_var_t.
I see.
> > My other thought: your patch seems optimal as far as avoiding IPIs goes, > but I wonder how often it folds down to a single CPU? That case is > easier to fast-path without using a new cpumask.
It will be quite often if threads number of user level APP is more than a half of LCPUs. It needs a new cpumask because we can not remove SMT bit on mm->cpu_vm_mask_var directly.
> > Cheers, > Rusty.
| |