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: <CABPqkBRkrHYJD0aA5o+uH1VmrvRqxj23cw+U73FKbZG_kgUxzw@mail.gmail.com>
Date:	Tue, 11 Oct 2011 15:35:24 +0200
From:	Stephane Eranian <eranian@...gle.com>
To:	Eric B Munson <emunson@...bm.net>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>, mingo@...e.hu,
	anton@...ba.org, linux-kernel@...r.kernel.org, paulus@...ba.org,
	hbabu@...ibm.com
Subject: Re: Oprofile Regression Caused by commit e5d1367f17ba6a6fed5fd8b74e4d5720923e0c25
 on PPC

On Tue, Oct 11, 2011 at 3:34 PM, Eric B Munson <emunson@...bm.net> wrote:
> On Tue, 11 Oct 2011, Stephane Eranian wrote:
>
>> On Tue, Oct 11, 2011 at 9:44 AM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
>> > On Mon, 2011-10-10 at 19:38 -0400, Eric B Munson wrote:
>> >> On Fri, 07 Oct 2011, Eric B Munson wrote:
>> >>
>> >> > This commit seems to have caused a regression with oprofile.  It is fairly easy
>> >> > to trigger, simply run oprofile monitoring an event that will fire (something
>> >> > frequent like CPU cycles) causes oprofile to fail saying that the PMU is in use.
>> >> > If I disable CONFIG_CGROUP_PERF, everything goes back to working.  I suspect the
>> >> > problem is that the PMU is being initialized without being reserved for perf.  I
>> >> > am not yet sure of the right fix yet so if you have any suggestions I would
>> >> > appreciate them.
>> >> >
>> >> > Eric
>> >>
>> >> This isn't the best description of the behavior we see, what happens is at some
>> >> point in the profiling session the MMCR register is clobbered by
>> >> perf_cgroup_switch() which calls perf_pmu_enable() without reserving the PMC
>> >> hardware.  When this happens oprofile stops counting.  It doesn't happen each
>> >> time so some runs show event counts that are reasonable, but it can also lead to
>> >> event counts that are smaller than expected, or completely missing.
>> >
>> > What kernel are you testing?
>> >
>> Looking at 3.1-rc9, I doubt it's coming from perf_cgroup_switch(). The function
>> is checking for perf context with at least of cgroup event before
>> calling perf_pmu_disable().
>> If there is no active perf context, there is no cgroup event, thus the
>> function is a nop.
>> Even if you have a competing perf session, it would have to have at
>> least one cgroup
>> event for this code to touch HW. The problem must come from somewhere else.
>>
>> >
>>
>
> Does activating any cgroup setup a cgroup event?
>
No, you need to explicitly request a cgroup event.
--
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