From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261706AbVGYFaZ (ORCPT ); Mon, 25 Jul 2005 01:30:25 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261707AbVGYFaY (ORCPT ); Mon, 25 Jul 2005 01:30:24 -0400 Received: from willy.net1.nerim.net ([62.212.114.60]:34062 "EHLO willy.net1.nerim.net") by vger.kernel.org with ESMTP id S261706AbVGYFaT (ORCPT ); Mon, 25 Jul 2005 01:30:19 -0400 Date: Mon, 25 Jul 2005 07:18:48 +0200 From: Willy Tarreau To: Florin Malita Cc: Linux Kernel Mailing List Subject: Re: kernel 2.6 speed Message-ID: <20050725051848.GT8907@alpha.home.local> References: <20050724191211.48495.qmail@web53608.mail.yahoo.com> <1122248869.10835.25.camel@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 25, 2005 at 12:10:15AM -0400, Florin Malita wrote: > On 7/24/05, Alan Cox wrote: > > time() isn't a hot > > path in the real world. > > That's what you would expect but I've straced stuff calling > gettimeofday() in huge bursts every other second. Obviously braindead > stuff but so is "the real world" most of the time() ... :) gettimeofday() is known to be called very often (after any select() or poll() returns), and is optimized for such conditions. There was even an implementation, which I don't know if it finally became mainstream, which optimized this particular system call. Some networking applications might call it tens of thousands of times per second. But as Alan said, time() (not to be confused with gettimeofday()) is not a hot path. Willy