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
| ||
|
Date: Tue, 12 Nov 2013 15:14:12 +0100 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>, Arnaldo Carvalho de Melo <acme@...hat.com>, Jiri Olsa <jolsa@...hat.com>, "Yan, Zheng" <zheng.z.yan@...el.com>, Borislav Petkov <bp@...en8.de>, Maria Dimakopoulou <maria.n.dimakopoulou@...il.com> Subject: Re: [PATCH v6 3/4] perf,x86: add Intel RAPL PMU support Peter, I spent some time trying to understand the hotplug code in kernel/cpu.c. I still see this cpu_hotplug_begin()/cpu_hotplug_done() pair which serializes access. So it seems that hotplug is still serialized. That appears to be true also for the CPU_STARTING phase of hiotplug. I don't know where Andi got that cpu starting was parallel now. Andi? If hotplug is not parallel, then we can drop that RAPL hotplug_lock I added. On Mon, Nov 11, 2013 at 5:16 PM, Peter Zijlstra <peterz@...radead.org> wrote: > On Mon, Nov 11, 2013 at 05:07:22PM +0100, Stephane Eranian wrote: >> On Mon, Nov 11, 2013 at 4:59 PM, Peter Zijlstra <peterz@...radead.org> wrote: >> > On Fri, Nov 08, 2013 at 08:46:02PM +0100, Stephane Eranian wrote: >> > >> > >> >> +static DEFINE_SPINLOCK(rapl_hotplug_lock); >> > >> > What is this thing protecting? >> > >> > Like last time it appears to be used only from hotplug notifier >> > callbacks and those are already fully serialized. >> > >> I thought you or somebody else had said, that hotplug in now parallel. > > There's a little something about hotplug here I think: > > http://marc.info/?l=linux-kernel&m=138118235612441 > > But I'm not entirely sure that's the origin of this lock. > > Andi seems worried about the IPI vs hotplug/migrate. I'm not entrely > sure the lock as proposed actually fixes that. > > The 'easy' way would be to put a synchronize_sched() right after the > migrate code, that forces all CPUs to have scheduled once and thus also > ensures all pending/running interrupts are serviced. > > But I don't think that's strictly required as I seem to recall hotplug > actually already does something like this -- it pretty much has to. -- 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