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]
Message-ID: <CANLsYkxk6shqkqd6Omzo5J4zeeSJ-uxhk0MDdiQ3mrmGmmBFpQ@mail.gmail.com>
Date:	Tue, 20 Oct 2015 10:43:14 -0600
From:	Mathieu Poirier <mathieu.poirier@...aro.org>
To:	Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc:	Greg KH <gregkh@...uxfoundation.org>, a.p.zijlstra@...llo.nl,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ingo Molnar <mingo@...hat.com>, Jon Corbet <corbet@....net>,
	Nicolas Pitre <nicolas.pitre@...aro.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Chunyan Zhang <zhang.chunyan@...aro.org>,
	Mike Leach <mike.leach@....com>,
	"Jeremiassen, Tor" <tor@...com>, Al Grant <al.grant@....com>,
	Paweł Moll <pawel.moll@....com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>, linux-doc@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V2 22/30] coresight: etm-perf: new PMU driver for ETM tracers

On 19 October 2015 at 09:37, Alexander Shishkin
<alexander.shishkin@...ux.intel.com> wrote:
> Mathieu Poirier <mathieu.poirier@...aro.org> writes:
>
>> +static int etm_event_pmu_start(struct perf_event *event)
>> +{
>> +     int cpu, ret;
>> +     cpumask_t mask;
>> +     struct coresight_device *csdev;
>> +
>> +     cpumask_clear(&mask);
>> +     if (event->cpu != -1)
>> +             cpumask_set_cpu(event->cpu, &mask);
>> +     else
>> +             cpumask_copy(&mask, cpu_online_mask);
>> +
>> +     for_each_cpu(cpu, &mask) {
>> +             csdev = per_cpu(csdev_src, cpu);
>> +
>> +             if (!source_ops(csdev)->perf_start)
>> +                     continue;
>> +
>> +             ret = source_ops(csdev)->perf_start(csdev);
>> +             if (ret)
>> +                     goto err;
>
> So long as "perf_start" and "perf_stop" here mean
> "pm_runtime_get()/put()", this can work, but in that case maybe a better
> name should be used, because no real starting or stopping of anything
> takes place here.

You're correct, nothing else than pm_runtime operations should be
happening in there.  I will revise the naming convention.

> Since pmu::event_init and event::destroy happen in
> allocation/deallocation paths and at event scheduling, it's not a good
> idea to actually start anything here.
>
> Regards,
> --
> Alex
--
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