Date: Tue, 6 Aug 2002 01:32:31 -0700 From: Luigi Rizzo <rizzo@icir.org> To: Jake Burkholder <jake@locore.ca> Cc: Peter Wemm <peter@wemm.org>, Terry Lambert <tlambert2@mindspring.com>, smp@FreeBSD.ORG Subject: Re: how to create per-cpu variables in SMP kernels ? Message-ID: <20020806013231.A27897@iguana.icir.org> In-Reply-To: <20020806023816.D76014@locore.ca>; from jake@locore.ca on Tue, Aug 06, 2002 at 02:38:17AM -0400 References: <20020805015340.A17716@iguana.icir.org> <20020805221415.B0C732A7D6@canning.wemm.org> <20020805230556.C26751@iguana.icir.org> <20020806023816.D76014@locore.ca>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 06, 2002 at 02:38:17AM -0400, Jake Burkholder wrote: ... > This doesn't work because the page directory is per-process, not per-cpu. > To implement this you would need a fixed page directory entry which pointed > to a different page table page on each cpu, which mapped the different > per-cpu pages to the same virtual address. If 2 processes which shared > page directories were running concurrently on 2 cpus, they would both > see the same per-cpu data (one of then would get the wrong struct pcpu). > Basically the struct pcpu's cannot all be mapped to the same virtual > address. so how does the use of %fs solve the problem ? sorry if the question is naive... 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?20020806013231.A27897>