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: <20090811162313.GA8325@sig21.net>
Date:	Tue, 11 Aug 2009 18:23:13 +0200
From:	Johannes Stezenbach <js@...21.net>
To:	mingo@...hat.com, hpa@...or.com, paulus@...ba.org, acme@...hat.com,
	linux-kernel@...r.kernel.org, a.p.zijlstra@...llo.nl,
	efault@....de, fweisbec@...il.com, tglx@...utronix.de,
	mingo@...e.hu
Subject: Re: [tip:perfcounters/urgent] perf_counter, x86: Fix/improve apic
 fallback

On Tue, Aug 11, 2009 at 11:34:21AM +0000, tip-bot for Ingo Molnar wrote:
> Commit-ID:  83f19150242ee57730a4331b6ae9a9b90ccc718c
> Gitweb:     http://git.kernel.org/tip/83f19150242ee57730a4331b6ae9a9b90ccc718c
> Author:     Ingo Molnar <mingo@...e.hu>
> AuthorDate: Tue, 11 Aug 2009 10:40:08 +0200
> Committer:  Ingo Molnar <mingo@...e.hu>
> CommitDate: Tue, 11 Aug 2009 13:19:07 +0200
> 
> perf_counter, x86: Fix/improve apic fallback
> 
> Johannes Stezenbach reported that his Pentium-M based
> laptop does not have the local APIC enabled by default,
> and hence perfcounters do not get initialized.
> 
> Add a fallback for this case: allow non-sampled counters
> and return with an error on sampled counters. This allows
> 'perf stat' to work out of box - and allows 'perf top'
> and 'perf record' to fall back on a hrtimer based sampling
> method.
> 
> ( Passing 'lapic' on the boot line will allow hardware
>   sampling to occur - but if the APIC is disabled
>   permanently by the hardware then this fallback still
>   allows more systems to use perfcounters. )
> 
> Also decouple perfcounter support from X86_LOCAL_APIC.

Seems to work.  From dmesg:

   Performance Counters: 
   no APIC, boot with the "lapic" boot parameter to force-enable it.
   no hardware sampling interrupt available.
   p6 PMU driver.
   ... version:                 0
   ... bit width:               32
   ... generic counters:        2
   ... value mask:              00000000ffffffff
   ... max period:              000000007fffffff
   ... fixed-purpose counters:  0
   ... counter mask:            0000000000000003
   CPU: Intel(R) Pentium(R) M processor 1.80GHz stepping 06

However:

   oprofile: using timer interrupt.

I tried "perf top", "perf stat -a sleep 1", "perf stat java foo",
it all looks good to my untrained eye.


Thanks,
Johannes
--
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