From owner-freebsd-arch@FreeBSD.ORG Mon Jun 5 17:08:43 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 9850016AFE9; Mon, 5 Jun 2006 17:08:43 +0000 (UTC) (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 2E67B43D4C; Mon, 5 Jun 2006 17:08:43 +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 022BD170DE; Mon, 5 Jun 2006 17:08:40 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.6/8.13.6) with ESMTP id k55H8c95020284; Mon, 5 Jun 2006 19:08:39 +0200 (CEST) (envelope-from phk@critter.freebsd.dk) To: Kirk McKusick From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 05 Jun 2006 10:00:24 PDT." <200606051700.k55H0OeJ092393@chez.mckusick.com> Date: Mon, 05 Jun 2006 19:08:38 +0200 Message-ID: <20279.1149527318@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: arch@freebsd.org, Garrett Wollman , rwatson@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 17:08:53 -0000 In message <200606051700.k55H0OeJ092393@chez.mckusick.com>, Kirk McKusick write s: >Your above analysis is correct. When we made the pass over the code >base to eliminate all references to "u." we had also hoped to get rid >of all references to "curproc". While we were successful with the former, >it eventually became clear that the latter was not practical. But by >that time, the convention of passing the current process pointer to >Syscall was established, and removing it did not seem to be worth >the effort. It would be a good Junior Kernel Hacker project to try to replace these passed arguments with curproc and see if a measurable difference in performance is obtained. -- 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.