lkml.org 
[lkml]   [2013]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 04/10] idr: Percpu ida
On Wed, Aug 07, 2013 at 05:56:34PM +0000, Christoph Lameter wrote:
> On Wed, 7 Aug 2013, Kent Overstreet wrote:
>
> > +{
> > + DEFINE_WAIT(wait);
> > + struct percpu_ida_cpu *tags;
> > + unsigned long flags;
> > + unsigned this_cpu;
> > + int tag;
> > +
> > + local_irq_save(flags);
>
> > + this_cpu = smp_processor_id();
> > + tags = per_cpu_ptr(pool->tag_cpu, this_cpu);
>
> tags = this_cpu_ptr(pool->tag_cpu);

I was breaking it apart because I was using this_cpu elsewhere too - for
the bitmap of which cpus have non empty freelists.

Or is this_cpu_ptr() doing something smarter than per_cpu_ptr(ptr,
smp_processer_id())? There's so many variants I'm not 100% sure they're
the same.


\
 
 \ /
  Last update: 2013-08-07 21:01    [W:0.198 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site