Date: Tue, 6 Aug 2002 10:53:23 -0700 (PDT) From: Julian Elischer <julian@elischer.org> To: Terry Lambert <tlambert2@mindspring.com> Cc: Luigi Rizzo <rizzo@icir.org>, Peter Wemm <peter@wemm.org>, smp@freebsd.org Subject: Re: how to create per-cpu variables in SMP kernels ? Message-ID: <Pine.BSF.4.21.0208061005150.65715-100000@InterJet.elischer.org> In-Reply-To: <3D4F7D1B.4D91400A@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 6 Aug 2002, Terry Lambert wrote: > Luigi Rizzo wrote: > > NO. This can not work. > > The problem is that the per-CPU are is mapped into the same > location on each CPU -- and *totally inaccessible* to other CPUs. Terry, -current does not have multile page directories , one per cpu. (not any more). we use teh %fs register which is not used for anything else to have a special 'per-cpu segment'. The per-cpu mappings were being used at one stage but not any more... each pcpu area lives at a different virtual address now. basically, we do *all_pcpu[MAXCPU] where the index is achieved using the unused %fs register to make teh indexing work. in some places in the kernel we actually iterate through the elements. if they were not at different addreses this would not be possible. 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?Pine.BSF.4.21.0208061005150.65715-100000>