[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1243952741.13761.65.camel@twins>
Date: Tue, 02 Jun 2009 16:25:41 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Rabin Vincent <rabin@....in>
Cc: Paul Mundt <lethal@...ux-sh.org>, Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Daniel Walker <dwalker@...o99.com>,
Linus Walleij <linus.ml.walleij@...il.com>,
Andrew Victor <linux@...im.org.za>,
Haavard Skinnemoen <hskinnemoen@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
John Stultz <johnstul@...ux.vnet.ibm.com>,
linux-arm-kernel@...ts.arm.linux.org.uk, linux-sh@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] sched: sched_clock() clocksource handling.
On Tue, 2009-06-02 at 19:47 +0530, Rabin Vincent wrote:
> On Tue, Jun 02, 2009 at 04:17:18PM +0900, Paul Mundt wrote:
> > sched: sched_clock() clocksource handling.
> >
> > There are presently a number of issues and limitations with how the
> > clocksource and sched_clock() interaction works today. Configurations
> > tend to be grouped in to one of the following:
> >
> > - Platform provides a clocksource unsuitable for sched_clock()
> > and prefers to use the generic jiffies-backed implementation.
> >
> > - Platform provides its own clocksource and sched_clock() that
> > wraps in to it.
> >
> > - Platform uses a generic clocksource (ie, drivers/clocksource/)
> > combined with the generic jiffies-backed sched_clock().
> >
> > - Platform supports multiple sched_clock()-capable clocksources.
> >
> > This patch adds a new CLOCK_SOURCE_USE_FOR_SCHED_CLOCK flag to address
> > these issues, which can be set for any sched_clock()-capable clocksource.
> >
> > The generic sched_clock() implementation is likewise switched over to
> > always read from a designated sched_clocksource, which is default
> > initialized to the jiffies clocksource and updated based on the
> > availability of CLOCK_SOURCE_USE_FOR_SCHED_CLOCK sources. As this uses
> > the generic cyc2ns() logic on the clocksource ->read(), most of the
> > platform-specific sched_clock() implementations can subsequently be
> > killed off.
>
> 80ea3bac3a47bc73efa334d0dd57099d0ff14216 ("ARM: OMAP: sched_clock()
> corrected") seems to have switched omap from cyc2ns() to an open coded
> calculation based on mult_orig because cyc2ns() uses the NTP-adjusted
> mult instead. Does that apply here or is that change incorrect?
Hmm, that would be a problem, because changing the mult can cause non
monotonic behaviour.
--
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