Re: [PATCH] Posix CLOCK_RTC interface proof of concept

From: Richard Cochran
Date: Sat Sep 18 2010 - 02:15:35 EST


On Fri, Sep 17, 2010 at 11:42:38AM -0700, john stultz wrote:
> On Fri, 2010-09-17 at 12:59 +0200, Thomas Gleixner wrote:
> > That's basically a copy of enqueue_hrtimer(). Can't we use
> > k_itimer.it.real for this and reuse the related functions in
> > hrtimer.c? Not sure if it's worth the trouble though.
>
> Yes, there's also a similar duplication in drivers/char/mmtimer.c and
> Richard Cochran commented on the same (although I'm not sure if he ended
> up using the hrtimer for his similar PTP code).

After taking a look at the hrtimer code, I decided to remove the timer
implementation from the patch set. I do have the userland interface to
timer_create/settime in place, but no clock drivers implement it yet.

> I was hoping to find something I could re-use in the hrtimer code, but
> it seemed a little tightly linked to the fixed CLOCK_MONOTONIC/REALTIME
> bases.

That was my impression, too. It looks like hrtimers are hard-coded to
the clock event device via a global per-cpu variable. Would it be
possible to decouple this for multiple, different clock event devices?

Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/