From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 2 17:40:50 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D2E237B401 for ; Sat, 2 Aug 2003 17:40:50 -0700 (PDT) Received: from stork.mail.pas.earthlink.net (stork.mail.pas.earthlink.net [207.217.120.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7B5A243F3F for ; Sat, 2 Aug 2003 17:40:49 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-38lc076.dialup.mindspring.com ([209.86.0.230] helo=mindspring.com) by stork.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19j6vS-0000fC-00; Sat, 02 Aug 2003 17:40:44 -0700 Message-ID: <3F2C59D3.43BBFE7C@mindspring.com> Date: Sat, 02 Aug 2003 17:39:47 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Matthew Dillon References: <20030731201227.28952.qmail@neuroflux.com> <200308022214.h72MEgrE015449@apollo.backplane.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a49ddbbdc715a87b7028d77cc39a091e95350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c cc: freebsd-hackers@freebsd.org cc: Shawn Subject: Re: Assembly Syscall Question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Aug 2003 00:40:50 -0000 Matthew Dillon wrote: > I think the ultimate performance solution is to have some explicitly > shared memory between kerneland and userland and store the arguments, > error code, and return value there. Being a fairly small package of > memory multi-threading would not be an issue as each thread would have > its own slot. You need 8K for this, minimally: 4K that's RO user/RW kernel and 4K that's RW user/RW kernel. You can use it for things like zero system call getpid/getuid/etc.. It's also worth a page doubly mapped, with the second mapping with the PG_G bit set on it (to make it RO visible to user space at the sampe place in all programs) to hold the timecounter information; the current timecounter implementation, with a scad of structures, is both wasteful and unnecessary, given that pointer assigns are atomic, so you can implement with only two, which only take a small part of the page. Doing this, you can use a pointer reference and a structure assign, and a compare-pointer-afterwards to make a zero system call gettimeofday() and other calls (consider the benefits to Apache, SQID, and other programs that have hard "logging with timestamp" requirements). I've also been toying with the idea of putting environp ** in a COW page, and dealing with changes as a "fixup" operation in the fault handler (really, environp needs to die, to make way for logical name tables; it persists because POSIX and SuS demand that it persist). So, Matt... how does the modified message based system call interface fare in a before-and-after with "lmbench"? 8-) 8-). -- Terry