Date: Mon, 5 Aug 2002 02:02:40 -0700 From: Luigi Rizzo <rizzo@icir.org> To: Terry Lambert <tlambert2@mindspring.com> Cc: smp@freebsd.org Subject: Re: how to create per-cpu variables in SMP kernels ? Message-ID: <20020805020239.B17716@iguana.icir.org> In-Reply-To: <3D4E3D55.38ECB8E@mindspring.com>; from tlambert2@mindspring.com on Mon, Aug 05, 2002 at 01:54:45AM -0700 References: <20020804182713.A14944@iguana.icir.org> <3D4E1ECB.348978D1@mindspring.com> <20020805015340.A17716@iguana.icir.org> <3D4E3D55.38ECB8E@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 05, 2002 at 01:54:45AM -0700, Terry Lambert wrote: ... > > i am asking because in the code I see several instance of things like > > > > p = curproc; > > <code using p instead of curproc> > > > > in a context where curproc is not supposed to change. Is there a > > performance bonus in doing this, or not ? > > Yes. Look at the definition of curproc. which was my question in the first place :) From what i have seen, in -current at least, reading one of these variables merely means accessing them through %fs, but other than that they look no different than other globals. Am i wrong ? (in fact, i wonder if the code couldn't be made a little bit smarter -- if as you say these variables are in a specially mapped page, they should look just the same as others, don't they ? cheers luigi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020805020239.B17716>