From owner-freebsd-net@FreeBSD.ORG Fri Oct 14 19:36:40 2005 Return-Path: X-Original-To: net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9E31516A41F for ; Fri, 14 Oct 2005 19:36:40 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.FreeBSD.org (Postfix) with ESMTP id 628AA43D75 for ; Fri, 14 Oct 2005 19:36:33 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (unknown [192.168.48.2]) by phk.freebsd.dk (Postfix) with ESMTP id F286FBC66; Fri, 14 Oct 2005 19:36:29 +0000 (UTC) To: Andrew Gallatin From: "Poul-Henning Kamp" In-Reply-To: Your message of "Fri, 14 Oct 2005 15:19:19 EDT." <17232.1207.615226.432579@grasshopper.cs.duke.edu> Date: Fri, 14 Oct 2005 21:36:28 +0200 Message-ID: <33011.1129318588@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Garrett Wollman , net@FreeBSD.org Subject: Re: Call for performance evaluation: net.isr.direct (fwd) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Oct 2005 19:36:40 -0000 In message <17232.1207.615226.432579@grasshopper.cs.duke.edu>, Andrew Gallatin writes: > >Poul-Henning Kamp writes: > > The solution is not faster but less reliable timekeeping, the > > solution is to move the scheduler(s) away from using time as an > > approximation of cpu cycles. > >So you mean rather than use binuptime() in mi_switch(), use some >per-cpu cycle counter (like rdtsc)? yes. >Heck, why not just use ticks for the scheduler and keep the expensive >timekeeping code out of the critical path altogether? Does it really >need better than 1ms resolution? Because the resource accounting needs to know how much cpu power each process/thread has used, and the units used assume a constant clockrate (see times(3)) -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.