lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 12 Sep 2012 16:46:57 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	"mingo@...e.hu" <mingo@...e.hu>,
	"ak@...ux.intel.com" <ak@...ux.intel.com>,
	"Yan, Zheng" <zheng.z.yan@...el.com>,
	Robert Richter <robert.richter@....com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [PATCH v2 1/3] hrtimer: add hrtimer_init_cpu()

On Wed, Sep 12, 2012 at 4:38 PM, Peter Zijlstra <peterz@...radead.org> wrote:
> 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 ;-)

I am fine with dropping this patch. I just found it odd there was a per-cpu
data reference embedded deep into the call. I wanted things to be more
explicit. I know it works without the proposed change.
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ