Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753934AbZGRW2d (ORCPT ); Sat, 18 Jul 2009 18:28:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753810AbZGRW2b (ORCPT ); Sat, 18 Jul 2009 18:28:31 -0400 Received: from casper.infradead.org ([85.118.1.10]:49196 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753747AbZGRW2b (ORCPT ); Sat, 18 Jul 2009 18:28:31 -0400 Date: Sat, 18 Jul 2009 15:30:11 -0700 From: Arjan van de Ven To: john stultz Cc: Thomas Gleixner , lkml , Thomas Gleixner , Ingo Molnar , Andi Kleen , nikolag@ca.ibm.com, Darren Hart Subject: Re: [RFC][PATCH] Introduce CLOCK_REALTIME_COARSE Message-ID: <20090718153011.1de3af8e@infradead.org> In-Reply-To: <1247954978.14494.19.camel@work-vm> References: <1247873945.8334.67.camel@localhost.localdomain> <1247954978.14494.19.camel@work-vm> Organization: Intel X-Mailer: Claws Mail 3.7.1 (GTK+ 2.14.7; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1458 Lines: 40 On Sat, 18 Jul 2009 15:09:38 -0700 john stultz 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.... > me_lock, seq)); > + > + set_normalized_timespec(&now, now.tv_sec + mono.tv_sec, > + now.tv_nsec + mono.tv_nsec); > + return now; > +} > +EXPORT_SYMBOL(get_monotonic_coarse); > + why does this need to be exported ? -- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/