From owner-cvs-all Thu Oct 25 1:18:58 2001 Delivered-To: cvs-all@freebsd.org Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by hub.freebsd.org (Postfix) with ESMTP id CEE4237B409 for ; Thu, 25 Oct 2001 01:18:49 -0700 (PDT) Received: (qmail 17433 invoked from network); 25 Oct 2001 08:18:33 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail6.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 25 Oct 2001 08:18:33 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20011025173143.M77185-100000@delplex.bde.org> Date: Thu, 25 Oct 2001 01:18:30 -0700 (PDT) From: John Baldwin To: Bruce Evans Subject: Re: cvs commit: src/sys/i386/i386 genassym.c machdep.c swtch.s s Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 25-Oct-01 Bruce Evans wrote: > On Wed, 24 Oct 2001, John Baldwin wrote: > >> jhb 2001/10/24 17:53:44 PDT >> >> Modified files: >> sys/i386/i386 genassym.c machdep.c swtch.s >> sys_machdep.c vm_machdep.c >> sys/i386/include pcb.h pcb_ext.h proc.h >> Log: >> Split the per-process Local Descriptor Table out of the PCB and into >> struct mdproc. >> >> Submitted by: Andrew R. Reiter >> Silence on: -current > > I was waiting for a review, or at least an rationale for this change. > > Why? It seems to mainly pessimize things by adding an indirection > or two. Not long ago, and still in RELENG_4, it would have saved > indirections, because p->p_md was direct and p->p_addr was indirect, > but now both td->td_pcb and td->td_proc->p_md are indirect. > > Similarly for moving whole user area or whole pcb into p_md. It would > have saved lots of indirections but would now add a few indirections or > a lot of indirections (depending on how well you load &td->td_proc->p_md > into a register; note that gcc can't optimize multiple references to > td->td_proc into a single load because of aliasing problems). Imagine a process with 8 threads that sets up a user ldt. Now we have to go update the ldt in all 8 pcb's. A ldt is per-process, not per-thread. The pcb is per-thread, so it is a bad place for this. Also, in 4.x, if your stack starts to overflow, it will kill the ldt (and a tss if you have one, leading to some interesting failure modes) whereas the ldt is now in a place where it can't be trashed by the stack. > Bruce -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message