[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1267518088.25158.0.camel@laptop>
Date: Tue, 02 Mar 2010 09:21:28 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: eranian@...gle.com
Cc: linux-kernel@...r.kernel.org, mingo@...e.hu, paulus@...ba.org,
fweisbec@...il.com, perfmon2-devel@...ts.sf.net,
robert.richter@....com, eranian@...il.com
Subject: Re: [PATCH] perf_events: add sampling period randomization support
On Mon, 2010-03-01 at 22:07 -0800, eranian@...gle.com wrote:
> This patch adds support for randomizing the sampling period.
> Randomization is very useful to mitigate the bias that exists
> with sampling. The random number generator does not need to
> be sophisticated. This patch uses the builtin random32()
> generator.
>
> The user activates randomization by setting the perf_event_attr.random
> field to 1 and by passing a bitmask to control the range of variation
> above the base period. Period will vary from period to period & mask.
> Note that randomization is not available when a target interrupt rate
> (freq) is enabled.
>
> The last used period can be collected using the PERF_SAMPLE_PERIOD flag
> in sample_type.
>
> The patch has been tested on X86. There is also code for PowerPC but
> I could not test it.
I don't thikn we need to touch the arch code, we didn't need to for
frequency driven sampling, so I don't see a reason to do so for
randomization either.
--
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