Date: Fri, 6 Nov 1998 10:14:51 +1100 From: Peter Jeremy <peter.jeremy@auss2.alcatel.com.au> To: current@FreeBSD.ORG Subject: Re: Kernel threading (was Re: Thread Scheduler bug) Message-ID: <98Nov6.101447est.40365@border.alcanet.com.au>
next in thread | raw e-mail | index | archive | help
Julian Elischer <julian@whistle.com> writes: > easier to simply have a single pointer in a known address > that gets rewritten by the kernel on scheduling.. probably actually an > array of them, (one per cpu) with a 'getcpunumber()' to allow > the thread to work out which it should use. If I remember correctly, Sun have a per-CPU address space in Solaris kernel space (or maybe it was SunOS). I can't remember the exact size or address, but it went something like: 0xffe0000 - current CPU always mapped here 0xfffN000 - cpu N mapped here for all CPUs. This allows the kernel to have per-CPU data structures that can be readily accessed either for the CPU the thread is on, or for any other CPU. The CPU number could be a constant within the per-CPU space. A similar approach is possible for user space, but the cost of updating the PTEs may make it unacceptably expensive (as someone else mentioned). Peter -- Peter Jeremy (VK2PJ) peter.jeremy@alcatel.com.au Alcatel Australia Limited 41 Mandible St Phone: +61 2 9690 5019 ALEXANDRIA NSW 2015 Fax: +61 2 9690 5247 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?98Nov6.101447est.40365>
