From owner-freebsd-current@FreeBSD.ORG Mon Apr 23 17:44:01 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 CBA0816A401 for ; Mon, 23 Apr 2007 17:44:01 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id 7C92013C46C for ; Mon, 23 Apr 2007 17:44:01 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 02B2E8BD2C4; Mon, 23 Apr 2007 19:43:59 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id G7yAddNLIAOt; Mon, 23 Apr 2007 19:43:59 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id F28C78BD23D; Mon, 23 Apr 2007 19:43:58 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l3NHhuNX046970; Mon, 23 Apr 2007 19:43:56 +0200 (CEST) (envelope-from rdivacky) Date: Mon, 23 Apr 2007 19:43:56 +0200 From: Roman Divacky To: Tim Kientzle Message-ID: <20070423174356.GA46913@freebsd.org> References: <20070423113400.GC28587@gw.humppa.dk> <462CD251.9060105@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <462CD251.9060105@freebsd.org> User-Agent: Mutt/1.4.2.2i 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: Mon, 23 Apr 2007 17:44:01 -0000 On Mon, Apr 23, 2007 at 08:35:45AM -0700, Tim Kientzle wrote: > >>We can have 3 type of pages mapped into one process's address map. > >>1. System wide global readonly page which will help on these syscalls: > >> gethostname,getdomainname,uname > >> help on importing sysenter as syscall entry point!! > >> > >>2. Per process Readonly page. (change will still through standard syscall) > >> help on the syscalls: > >> getuid, geteuid, getpid,getgid, getegid, getpgrp, > >> > >>3. As you planed, Read+Write Page > > I don't really understand this suggestion. > > Do any real programs call these syscalls very often? > If not, this is unnecessary complexity. Making > a syscall fast that's only called once doesn't really > help performance. > > This type of approach is sometimes suggested for systime(), > which could have a big impact, as there are real programs > that call systime() thousands of times per second. > But I find it hard to believe there are programs that > call getuid() that often. on the other hand, if there is a easy to use API for this I don't see why it should not be converted. I agree that speeding up a "function" that gets called just once doesn't make much sense but if it means 5minutes + 20lines patch I think its worth it. just my 2 cents roman