[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1324472337.10752.11.camel@twins>
Date: Wed, 21 Dec 2011 13:58:57 +0100
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: Vince Weaver <vweaver1@...s.utk.edu>
Cc: mingo@...e.hu, William Cohen <wcohen@...hat.com>,
Stephane Eranian <eranian@...gle.com>,
Arun Sharma <asharma@...com>, Vince Weaver <vince@...ter.net>,
linux-kernel@...r.kernel.org
Subject: Re: [RFC][PATCH 0/6] perf: x86 RDPMC and RDTSC support
On Fri, 2011-12-16 at 17:36 -0500, Vince Weaver wrote:
> Is it possible to read multiple counters at once with this
> interface, i.e. using FORMAT_GROUP?
No, that's not something that I had considered, I'll see if I can make
that happen by making an array inside the control page instead of a
single version.
For now you'll have to mmap() the control page for each counter
individually.
> Also, am I correct that the counters are set to always counting, so you
> always have to do a rdpmc() before and a rdpmc() after?
Depending on how you use it, but yes that's how I'd use it, avoids
having to do ioctl()s
> I used the mmap_read_self() routine from your example as the "read"
> performance that I measured.
Yeah that's about it, if you want to discard the overload scenario, eg
you use pinned counters or so, you can optimize it further by stripping
out the tsc and scaling muck.
> If start/stop are truly unnecessary when run with your patch then the
> "total" results shift in your favor. Otherwise perfmon2 and perfctr still
> win the self-monitoring overhead race by a lot.
You can of course also do the start/stop/reset in userspace by keeping
an offset to the counter, avoiding the ioctl()s and simply keeping the
counter running.
--
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