From owner-freebsd-current@FreeBSD.ORG Tue Apr 24 04:48:46 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E71716A402; Tue, 24 Apr 2007 04:48:46 +0000 (UTC) (envelope-from dg@dglawrence.com) Received: from downloadtech.com (dt2-sfo.downloadtech.net [66.220.3.227]) by mx1.freebsd.org (Postfix) with ESMTP id 1461613C4B7; Tue, 24 Apr 2007 04:48:45 +0000 (UTC) (envelope-from dg@dglawrence.com) Received: from dglawrence.com (static-72-90-113-2.ptldor.fios.verizon.net [72.90.113.2]) by downloadtech.com (8.12.9p1/8.12.9) with ESMTP id l3O4L7tP057624; Mon, 23 Apr 2007 21:21:08 -0700 (PDT) (envelope-from dg@dglawrence.com) Received: from tnn.dglawrence.com (localhost [127.0.0.1]) by dglawrence.com (8.13.8/8.13.6) with ESMTP id l3O4L2CD030278; Mon, 23 Apr 2007 21:21:02 -0700 (PDT) (envelope-from dg@dglawrence.com) Received: (from dg@localhost) by tnn.dglawrence.com (8.13.8/8.13.8/Submit) id l3O4L2GC030250; Mon, 23 Apr 2007 21:21:02 -0700 (PDT) (envelope-from dg@dglawrence.com) X-Authentication-Warning: tnn.dglawrence.com: dg set sender to dg@dglawrence.com using -f Date: Mon, 23 Apr 2007 21:21:02 -0700 From: David G Lawrence To: Tim Kientzle Message-ID: <20070424042102.GI38475@tnn.dglawrence.com> References: <20070423113400.GC28587@gw.humppa.dk> <462CD251.9060105@freebsd.org> <20070423161711.GV39474@elvis.mu.org> <462D821F.6030707@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <462D821F.6030707@freebsd.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (downloadtech.com [66.220.3.227]); Mon, 23 Apr 2007 21:21:08 -0700 (PDT) Cc: current@freebsd.org, "Jesper B. Rosenkilde" Subject: Re: Suggestions on Avoiding syscall Overhead X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Apr 2007 04:48:46 -0000 > >>>>getuid, geteuid, getpid,getgid, getegid, getpgrp, > >> > >>I don't really understand this suggestion. > >>Do any real programs call these syscalls very often? > > > >There is indeed more and more programs calling some syscalls a > >*lot* .... MySQL calls gettimeofday() so much that changing > >the timer used on a system can lead to a very observable performance > >improvement. Similarly, PostgreSQL calls setproctitle() a lot ... > > Accelerating gettimeofday() makes a lot of sense; I've seen a > lot of programs that call it very often. gettimeofday(2) returns microsecond precision, so I don't see how this could be made accelerated via a mapped global page. time(3) [which is currently a wrapper for gettimeofday(2)], on the other had, could be put into such a page since it only updates once a second. Generally, I think that there are enough commonly used syscalls that would benefit from this that it is probably a good idea - at least a single system read-only page. I don't think it would be worth wasting a page for every process for process-specific data, however - the cost of allocating it, initializing it, etc, for every fork() would be a pessimization in most cases, I think. -DG David G. Lawrence President Download Technologies, Inc. - http://www.downloadtech.com - (866) 399 8500 The FreeBSD Project - http://www.freebsd.org Pave the road of life with opportunities.