From owner-cvs-src@FreeBSD.ORG Thu Oct 20 13:05:27 2005 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE49116A41F; Thu, 20 Oct 2005 13:05:27 +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 61B5343D62; Thu, 20 Oct 2005 13:05:27 +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 9BA7FBC66; Thu, 20 Oct 2005 13:05:20 +0000 (UTC) To: Bruce Evans From: "Poul-Henning Kamp" In-Reply-To: Your message of "Thu, 20 Oct 2005 22:55:23 +1000." <20051020215101.Y874@delplex.bde.org> Date: Thu, 20 Oct 2005 15:05:19 +0200 Message-ID: <25362.1129813519@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: Scott Long , src-committers@freebsd.org, Andrew Gallatin , cvs-src@freebsd.org, cvs-all@freebsd.org, David Xu Subject: Re: cvs commit: src/sys/amd64/amd64 cpu_switch.S machdep.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Oct 2005 13:05:28 -0000 In message <20051020215101.Y874@delplex.bde.org>, Bruce Evans writes: >On Thu, 20 Oct 2005, Poul-Henning Kamp wrote: >This point is for all the functions. A timestamp taken by 1 thread >might not be used until after many timestamps are taken and used by >other threads. Naive comparison of these timestamps would then give >apparent incoherencies. Ahh, but now we're into the "programmer doesn't understand concurrency" territory, that has little to do with our timekeeping functions. >On hub a few hours ago, csw was a transient 100-500 and the >average since boot time was 1010. The average since boot should not be optimized for, since we don't really care what the machine does (or doesn't) when we are not offering any workload to it. >So unavoidable context switches can happen >a lot on busy machines and the scheduler can't/shouldn't affect their >count except possibly to reduce it a bit. Given that they happen a lot >on some systems, they should be as efficient as possible. I think the >timecounter part of their inefficiency is not very important except in >the usual case of a slow timecounter. Losses from busted caches may >dominate. I would tend to agree with you there, but any sensible optimization should be done. >> It's so nice to have you back in action Bruce :-) > >I don't plan to stay very active. Too bad, your considered opinion, even though we often disagree, is one of the things I really enjoy around here: it forces me to think harder. -- 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.