Date: Thu, 25 Oct 2001 01:18:30 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/i386 genassym.c machdep.c swtch.s s Message-ID: <XFMail.011025011830.jhb@FreeBSD.org> In-Reply-To: <20011025173143.M77185-100000@delplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <arr@watson.org> >> 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 <jhb@FreeBSD.org> -- 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.011025011830.jhb>