[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090720063305.2ad49d40@infradead.org>
Date: Mon, 20 Jul 2009 06:33:05 -0700
From: Arjan van de Ven <arjan@...radead.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: john stultz <johnstul@...ibm.com>,
Thomas Gleixner <tglx@...utronix.de>,
lkml <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...x.de>, Ingo Molnar <mingo@...e.hu>,
Andi Kleen <ak@...e.de>, nikolag@...ibm.com,
Darren Hart <dvhltc@...ibm.com>
Subject: Re: [RFC][PATCH] Introduce CLOCK_REALTIME_COARSE
On Mon, 20 Jul 2009 13:17:02 +0200
Peter Zijlstra <peterz@...radead.org> wrote:
> On Sat, 2009-07-18 at 15:30 -0700, Arjan van de Ven wrote:
> > On Sat, 18 Jul 2009 15:09:38 -0700
> > john stultz <johnstul@...ibm.com> wrote:
> >
> > > After talking with some application writers who want very fast,
> > > but not fine-grained timestamps, I decided to try to implement a
> > > new clock_ids to clock_gettime(): CLOCK_REALTIME_COARSE and
> > > CLOCK_MONOTONIC_COARSE which returns the time at the last tick.
> > > This is very fast as we don't have to access any hardware (which
> > > can be very painful if you're using something like the acpi_pm
> > > clocksource), and we can even use the vdso clock_gettime() method
> > > to avoid the syscall. The only trade off is you only get low-res
> > > tick grained time resolution.
> >
> > Does this tie us to having a tick? I still have hope that we can get
> > rid of the tick even when apps are running .... since with CFS we
> > don't really need the tick for the scheduler anymore for example....
>
> On the hardware side to make this happen we'd need a platform that
> has:
>
> - cheap, high-res, cross-cpu synced, clocksource
> - cheap, high-res, clockevents
>
> Maybe power64, sparc64 and s390x qualify, but certainly nothing on x86
> does.
the x86 on my desk disagrees.
> Furthermore, on the software side we'd need a few modifications, such
> as doing lazy accounting for things like u/s-time which currently
> rely on the tick and moving the load-balancing into a hrtimer.
I thought the load balancer no longer runs as a timer.. but I could
well be wrong.
> Also, even with the above done, we'd probably want to tinker with the
> clockevent/hrtimer code and possibly use a second per-cpu hardware
> timer for the scheduler, since doing the whole hrtimer rb-tree dance
> for every context switch is simply way too expensive.
>
> But even with all that manged, there's still other bits that rely on
> the tick -- RCU being one of the more interesting ones.
we need to at least keep our options open to go there, since even the
early measurements (iirc from Andrea 5 years ago) of the 1 KHz time show
that it has a real performance impact, as much as 1%. While we may not
need to switch over RIGHT NOW, adding more dependencies on this timer
is just not a good idea...
--
Arjan van de Ven Intel Open Source Technology Centre
For development, discussion and tips for power savings,
visit http://www.lesswatts.org
--
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