From owner-freebsd-arch@FreeBSD.ORG Mon Jun 5 15:43:01 2006 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D592416A66E; Mon, 5 Jun 2006 15:43:01 +0000 (UTC) (envelope-from wollman@khavrinen.csail.mit.edu) Received: from khavrinen.csail.mit.edu (khavrinen.csail.mit.edu [128.30.28.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52D6C43D45; Mon, 5 Jun 2006 15:43:01 +0000 (GMT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: from khavrinen.csail.mit.edu (localhost.csail.mit.edu [127.0.0.1]) by khavrinen.csail.mit.edu (8.13.1/8.13.4) with ESMTP id k55FgxUA079170 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK CN=khavrinen.csail.mit.edu issuer=Client+20CA); Mon, 5 Jun 2006 11:42:59 -0400 (EDT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: (from wollman@localhost) by khavrinen.csail.mit.edu (8.13.1/8.13.4/Submit) id k55Fgx9V079169; Mon, 5 Jun 2006 11:42:59 -0400 (EDT) (envelope-from wollman) Date: Mon, 5 Jun 2006 11:42:59 -0400 (EDT) From: Garrett Wollman Message-Id: <200606051542.k55Fgx9V079169@khavrinen.csail.mit.edu> To: rwatson@freebsd.org In-Reply-To: <20060605163559.N50057@fledge.watson.org> References: <1fa17f810606050044k2847e4a2i150eb934ed84006f@mail.gmail.com> <1fa17f810606050608l5bd2ec5ch37663375f6fa5b64@mail.gmail.com> Organization: MIT Computer Science & Artificial Intelligence Lab X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-2.0.2 (khavrinen.csail.mit.edu [127.0.0.1]); Mon, 05 Jun 2006 11:43:00 -0400 (EDT) X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS,SPF_PASS version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on khavrinen.csail.mit.edu Cc: , arch@freebsd.org Subject: Re: Why use `thread' as an argument of Syscalls? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jun 2006 15:43:07 -0000 Robert Watson writes: >Certainly consistency. Most system calls do actually use the argument at some >point -- be it to look up a file descriptor, access control, or the like, and >the calling context has it for free and in-hand anyway. I believe it was the intention of the 4.4BSD developers to completely eliminate "curproc" (as they had already successfully eliminated "u"), on the theory that with a modern (RISC) processor architecture, passing the current process as a parameter wouldn't cost anything (since it would stay in a register for the life of the system call) whereas making a context-switched "curproc" would be expensive. -GAWollman