Hi Phillip,

Thanks for the response.

I guess I don't know much about hardware to at least have some direction.
>From what I have read, it seems like timers implemented with the hpet device
could give me the granularity I am looking for. If I understand correctly,
the getitimer function in Linux uses hpet.

The problem of using busy loop is that the CPU should be free for the
benchmark I want to run.

In case it is relevant, the machine is an AMD Opteron with nVidia
motherboard.

Luis.

On Sat, Oct 9, 2010 at 2:40 AM, Philip Guenther <[email protected]> wrote:

> On 9/29/10, Luis Useche <[email protected]> wrote:
> > I need to read a performance monitoring counter (RDPMC) every 100
> > microseconds or so. I found a way to do this on linux using the normal
> > getitimer library. However, the resolution of this timer in OBSD is 10
> > milliseconds. Do you know a way to have a higher resolution of the timer
> in
> > OBSD? One way is to do a busy loop, but this is not feasible in my
> problem.
>
> You don't really give enough information to give good advice
> (platform?  how is the RDPMC read?  notice how many replies you've
> gotten?), but depending on the details, writing a kernel driver may be
> the most natural way.  Otherwise, a busy loop in userspace watching
> the CPU's performance counter might be an option.
>
>
> Philip Guenther

Reply via email to