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] [day] [month] [year] [list]
Date:	Thu, 7 Nov 2013 18:24:06 +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 v5 3/4] perf,x86: add Intel RAPL PMU support

Peter,

Working on it. Found other bugs and cleanups, so I will respin the
entire series.
It will be easier that way.


On Wed, Nov 6, 2013 at 11:52 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> On Tue, Nov 05, 2013 at 06:01:25PM +0100, Stephane Eranian wrote:
>> +static void rapl_exit_cpu(int cpu)
>> +{
>> +     int i, phys_id = topology_physical_package_id(cpu);
>> +
>> +     spin_lock(&rapl_hotplug_lock);
>> +
>> +     /* if CPU not in RAPL mask, nothing to do */
>> +     if (!cpumask_test_and_clear_cpu(cpu, &rapl_cpu_mask))
>> +             goto skip;
>> +
>> +     /* find a new cpu on same package */
>> +     for_each_online_cpu(i) {
>> +             if (i == cpu || i == 0)
>> +                     continue;
>> +             if (phys_id == topology_physical_package_id(i)) {
>> +                     cpumask_set_cpu(i, &rapl_cpu_mask);
>> +                     break;
>> +             }
>> +     }
>> +
>> +     WARN_ON(cpumask_empty(&rapl_cpu_mask));
>> +skip:
>> +     spin_unlock(&rapl_hotplug_lock);
>> +}
>
>> +static int rapl_cpu_notifier(struct notifier_block *self,
>> +                          unsigned long action, void *hcpu)
>> +{
>
>> +     /* select the cpu that collects uncore events */
>> +     switch (action & ~CPU_TASKS_FROZEN) {
>> +     case CPU_DOWN_FAILED:
>> +     case CPU_STARTING:
>> +             rapl_init_cpu(cpu);
>> +             break;
>> +     case CPU_DOWN_PREPARE:
>> +             rapl_exit_cpu(cpu);
>> +             break;
>> +     default:
>> +             break;
>> +     }
>> +
>> +     return NOTIFY_OK;
>> +}
>
> All other uncore drivers call perf_pmu_migrate_context() when the CPU
> the events are registered on goes away.. ?
--
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