Date: Sun, 04 Aug 2002 23:44:27 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Luigi Rizzo <rizzo@icir.org> Cc: smp@freebsd.org Subject: Re: how to create per-cpu variables in SMP kernels ? Message-ID: <3D4E1ECB.348978D1@mindspring.com> References: <20020804182713.A14944@iguana.icir.org>
index | next in thread | previous in thread | raw e-mail
Luigi Rizzo wrote: > I would like to know how does the FreeBSD kernel (both in -current > and -stable) handle per-cpu variables such as curproc/curthread, cpuid, > and maybe more. Is there maybe any linker magic or similar things > that can be used to create more of these ? It puts them in a seperate per CPU page and or a per-CPU register. > How expensive is to access them compared to regular variables ? Depends on the specific variable's implementation. If you are asking because you want to add one, then don't. 8-). They damage symmetry (obviously). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the messagehelp
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D4E1ECB.348978D1>
