Date: 05 Nov 1998 09:52:55 +0200 From: Ville-Pertti Keinonen <will@iki.fi> To: Julian Elischer <julian@whistle.com> Cc: current@FreeBSD.ORG Subject: Re: Kernel threading (was Re: Thread Scheduler bug) Message-ID: <864ssed19k.fsf@not.oeno.com> In-Reply-To: Julian Elischer's message of "4 Nov 1998 07:15:50 %2B0200" References: <Pine.BSF.3.95.981103135641.1112F-100000@current1.whistle.com.newsgate.clinet.fi>
next in thread | previous 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. Do I understand you correctly that you're suggesting this for user-space code? Finding out which cpu you're running on in user mode isn't easier than finding out what thread you're running unless you mmap the local apic. Even then, how do you prevent the kernel from switching while you're holding the index? The i386 doesn't indirect deep enough in one insn. An m68k (from 68020 up) could do it. ;--) You know it can't switch threads because you wouldn't be executing in that context, but each instruction executed as the thread could be executed by a different cpu. 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?864ssed19k.fsf>