Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 8 Mar 2002 13:51:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 8 Mar 2002 13:51:38 -0500 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:55046 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Fri, 8 Mar 2002 13:51:32 -0500 Message-ID: <3C89080D.8060503@zytor.com> Date: Fri, 08 Mar 2002 10:50:53 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120 X-Accept-Language: en-us, en, sv MIME-Version: 1.0 To: Jamie Lokier CC: linux-kernel@vger.kernel.org, Alan Cox , Terje Eggestad , Ben Greear , Davide Libenzi , george anzinger Subject: Re: gettimeofday() system call timing curiosity In-Reply-To: <1015515815.4373.61.camel@pc-16.office.scali.no> <20020308013222.B14779@kushida.apsleyroad.org> <3C88157E.5010106@zytor.com> <20020308015701.C14779@kushida.apsleyroad.org> <20020308183049.A18247@kushida.apsleyroad.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Jamie Lokier wrote: > > On my laptop, the median of rdtsc+gettimeofday+rdtsc times is 470 cycles > for most runs of 1000, but is occasionally 453 cycles. > What that indicates to me is that 1000 is way too small of a sample. You're only talking a difference of 17,000 cycles, which could -- especially with cache effects -- easily be the time spent in an interrupt handler. -hpa - 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/