From owner-freebsd-current Fri Nov 6 11:50:31 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA20257 for freebsd-current-outgoing; Fri, 6 Nov 1998 11:50:31 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from post.mail.demon.net (post-12.mail.demon.net [194.217.242.41]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA20217 for ; Fri, 6 Nov 1998 11:50:21 -0800 (PST) (envelope-from james@westongold.com) Received: from [158.152.96.124] (helo=wgp01.wgold.demon.co.uk) by post.mail.demon.net with esmtp (Exim 2.05demon1 #1) id 0zbrtQ-0004aG-00; Fri, 6 Nov 1998 19:50:00 +0000 Received: by WGP01 with Internet Mail Service (5.5.1960.3) id ; Wed, 4 Nov 1998 09:16:11 -0000 Message-ID: <32BABEF63EAED111B2C5204C4F4F50201807@WGP01> From: James Mansion To: Julian Elischer , Daniel Eischen Cc: James Mansion , peter@netplex.com.au, current@FreeBSD.ORG, jb@cimlogic.com.au, lists@tar.com Subject: RE: Kernel threading (was Re: Thread Scheduler bug) Date: Wed, 4 Nov 1998 09:16:11 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.1960.3) Content-Type: text/plain Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hmm - why does the page need to be 'swapped out'? Can't it just be swapped into another part of the processes' existing space by frigging the mapping when the thread becomes scheduled? After all, each (user land) thread already has a stack area malloced or otherwise mapped into the address space. If you would rather just have a single pointer that's changed on a schedule, and the pointer has a well-known address, then fine. My understanding is that on some systems the thread's private data is accessed via value stored in a reserved register. I think that would be a mistake on an x86 where the number of registers is quite small, unless one of the segment base registers could be reserved without stuffing compilers, ABIs etc. Thread rescheduling should happen relatively infrequently compared to access to the thread-specific data. (I'm only here because I'm trying to guage whether it is worth trying to support FreeBSD as a reference SMP/threaded platform, so I'll not pretend any kernel (or ABI, or ...) expertise. I just need pthread_*, aio_*, and lio_* to work as advertised and be fast. Oh, and thread-safe STL and exception handling.) James > -----Original Message----- > From: Julian Elischer [mailto:julian@whistle.com] >... > if you make the threads have differnt pages, then either the > addres space > needs to be 'munged' on each reschedule (where is the page > swapped out to > since where it's swapped to depends on the object mapped into > the address > space), or you need to have multiple different address spaces > sharing a lot of 'objects' which is a lot less efficient. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message