Date: Thu, 28 Jan 2010 22:30:42 -0800 From: Juli Mallett <jmallett@FreeBSD.org> To: Randall Stewart <rrs@lakerest.net> Cc: freebsd-mips@freebsd.org, Neel Natu <neelnatu@gmail.com> Subject: Re: Code review: groundwork for SMP Message-ID: <eaa228be1001282230h82fc11ftf582a36d4a4322f8@mail.gmail.com> In-Reply-To: <37F434F8-C845-4A20-8188-CA26FB7B8C5C@lakerest.net> References: <dffe84831001262336l1978797g8b12fab815f4eb52@mail.gmail.com> <20100128.132114.1004138037722505681.imp@bsdimp.com> <dffe84831001281401n7c9fb64bjb38260943448f315@mail.gmail.com> <66207A08-F691-4603-A6C5-9C675414C91E@lakerest.net> <eaa228be1001282040r416f3764lde577786347a4d5e@mail.gmail.com> <98a59be81001282130n1776b31bn3f6995b6ef136ff0@mail.gmail.com> <37F434F8-C845-4A20-8188-CA26FB7B8C5C@lakerest.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 28, 2010 at 21:47, Randall Stewart <rrs@lakerest.net> wrote: > Do all of the mips processors have this scratch registers (I guess > I should scope that.. do the ones we care about have a scratch > register).. or is this an optional feature. Not anything like all or even all interesting ones. There are some registers you could try abusing that are widely-available but mostly unused, but most of them would require such a degree of discipline that they're not worth it. (Hell, you could use badvaddr as long as you refreshed it after every TLB miss.) > But I wonder how it compares to a indexed access that doing a > > pcpup = &pcpu[getcpuid()]; The problem is get "getcpuid" is very slow on some systems. If you have a really quick way of getting it, this isn't too bad, but my understanding is that that's one of the key reasons to avoid the array approach. Juli.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?eaa228be1001282230h82fc11ftf582a36d4a4322f8>