From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757309AbZEZUlJ (ORCPT ); Tue, 26 May 2009 16:41:09 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754441AbZEZUk5 (ORCPT ); Tue, 26 May 2009 16:40:57 -0400 Received: from e38.co.us.ibm.com ([32.97.110.159]:44900 "EHLO e38.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754091AbZEZUk4 (ORCPT ); Tue, 26 May 2009 16:40:56 -0400 Subject: Re: [PATCH] sched: Support current clocksource handling in fallback sched_clock(). From: john stultz To: Peter Zijlstra Cc: Linus Walleij , Paul Mundt , Ingo Molnar , Andrew Victor , Haavard Skinnemoen , Andrew Morton , linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, linux-arm-kernel@lists.arm.linux.org.uk, John Stultz , Thomas Gleixner In-Reply-To: <1243369815.6600.2.camel@laptop> References: <20090526061532.GD9188@linux-sh.org> <63386a3d0905260731m655bfee3q82a6f52d71fa3cef@mail.gmail.com> <1243348681.23657.14.camel@twins> <1243369423.3275.5.camel@localhost> <1243369815.6600.2.camel@laptop> Content-Type: text/plain Date: Tue, 26 May 2009 13:40:39 -0700 Message-Id: <1243370439.3275.13.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.26.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2009-05-26 at 22:30 +0200, Peter Zijlstra wrote: > On Tue, 2009-05-26 at 13:23 -0700, john stultz wrote: > > Overall, I'd probably suggest thinking this through a bit more. At some > > point doing this right will cause sched_clock() to be basically the same > > as ktime_get(). So why not just use that instead of remaking it? > > simply because we don't require the strict global monotonicy for > scheduling as we do from a regular time source (its nice to have > though). > > That means that on x86 we can always use TSC for sched_clock(), even > when its quite unsuitable for ktime. Right, but I guess what I'm asking is can this be a bit better defined? If we are going to use clocksources (or cyclecounters - an area I need to clean up soon), it would be good to get an idea of what is expected of the sched_clock() interface. So TSC good, HPET bad. Why? Is latency all we care about? How bad would the TSC have to be before we wouldn't want to use it? thanks -john