lkml.org 
[lkml]   [2012]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 1/3] hrtimer: add hrtimer_init_cpu()
From
Date
On Wed, 2012-09-12 at 16:33 +0200, Stephane Eranian wrote:

>
> If I do:
> for_each_possible_cpu(cpu) {
> cpuctx = per_cpu_ptr(pmu->pmu_cpu_context, cpu);
> hr = &cpuctx->hrtimer;
> hrtimer_init(hr)
> }
> I don't understand why I would have to refer to per-cpu data
> (hrtimer_bases) from
> a CPU that is not equal to "cpu" here. Unless you're telling me it's
> read-only data.

No its not read only, but it is unused until you do *hrtimer_start*(),
which will test and fix.

> But still if it's per-cpu why not initialize with the correct CPU from
> the start?

To keep the interface simpler I guess. There's no great harm in your
proposal, but it is strictly speaking superfluous. I'm not sure the max
one time avoidance of a base swizzle is worth the extra interface, I'll
leave that up to Thomas.

Also, what Eric said ;-)


\
 
 \ /
  Last update: 2012-09-12 17:22    [W:0.113 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site