mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marko Rauhamaa <marko@pacujo.net>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: Is the clockevent resolution fine-grained enough?
Date: 03 Mar 2007 18:46:35 -0800	[thread overview]
Message-ID: <m3fy8lybck.fsf@elektro.pacujo.net> (raw)
In-Reply-To: <1172912070.24738.99.camel@localhost.localdomain>

Thomas Gleixner <tglx@linutronix.de>:

> 100khz on a stock kernel with real world hardware:
> 
> ROTFL, You made my day. 

I don't know why you find that rate unbelievable.

> Sorry man. Did you actually read what I wrote ? 
> 
> > The clockevent subsystem operates on absolute time, so there is no
> > cummulative error

You are right. I misunderstood what you meant by "absolute time".

> timer_function()
> {
> 	do_whatever_you_need_to_do();
> 
> 	next_event += interval;
> 	set_next_event(yokto_seconds_to_nsec(next_event), ABSOLUTE);
> }
> 
> Please read _AND_ understand the clockevents code. Your uber_clockevents
> patch is solving PEBKAC.

I tried to quickly reconstruct the API from a recent clockevent patch I
found with google (<URL:
http://www.mail-archive.com/mm-commits@vger.kernel.org/msg09566.html>).
I saw the enum "CLOCK_EVT_MODE_PERIODIC" and automatically thought of
using that since my application is periodic. I imagined you wouldn't
have to keep on ordering the notification again in every callback. It's
also difficult to estimate how expensive an operation the explicit
rearming would be in the clock event device (the periodic notifications
can probably be optimized effectively).

You are right. By calling set_next_event() in every callback I can
implement what I want (provided that the API guarantees that the
absolute time can be in the past).


Marko

-- 
Marko Rauhamaa      mailto:marko@pacujo.net     http://pacujo.net/marko/

      reply	other threads:[~2007-03-04  2:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-02  2:34 Marko Rauhamaa
2007-03-02 16:05 ` Thomas Gleixner
2007-03-02 17:24   ` Marko Rauhamaa
2007-03-02 21:04     ` Henrique de Moraes Holschuh
2007-03-03  8:54     ` Thomas Gleixner
2007-03-04  2:46       ` Marko Rauhamaa [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3fy8lybck.fsf@elektro.pacujo.net \
    --to=marko@pacujo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®