From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rabin Vincent Date: Tue, 02 Jun 2009 14:29:37 +0000 Subject: Re: [PATCH] sched: sched_clock() clocksource handling. Message-Id: <20090602141737.GA2449@debian> List-Id: References: <20090602071718.GA17710@linux-sh.org> In-Reply-To: <20090602071718.GA17710@linux-sh.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paul Mundt , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Daniel Walker , Linus Walleij , Andrew Victor , Haavard Skinnemoen , Andrew Morton , John Stultz , linux-arm-kernel@lists.arm.linux.org.uk, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org 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? Rabin