From owner-freebsd-current Sat Nov 7 04:44:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA01198 for freebsd-current-outgoing; Sat, 7 Nov 1998 04:44:48 -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 EAA01189 for ; Sat, 7 Nov 1998 04:44:46 -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 0zc7j7-0004tN-00; Sat, 7 Nov 1998 12:44:26 +0000 Received: by WGP01 with Internet Mail Service (5.5.1960.3) id ; Sat, 7 Nov 1998 12:57:15 -0000 Message-ID: <32BABEF63EAED111B2C5204C4F4F5020180B@WGP01> From: James Mansion To: Daniel Eischen , James Mansion , peter@netplex.com.au Cc: current@FreeBSD.ORG, jb@cimlogic.com.au, lists@tar.com Subject: RE: Kernel threading (was Re: Thread Scheduler bug) Date: Sat, 7 Nov 1998 12:57:08 -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 > From: Daniel Eischen [mailto:eischen@vigrid.com] > > *My* concern is that pthread_self, and access to > thread-specific data, > > should be as fast as possible. Writing thread-hot libraries without > > good thread specific data is irksome to say the least. > > My point was that you can't have just one common pointer (address) > to TSD that is changed on thread schedule as it would limit you > to being able to execute only one thread per process at a time. > To take advantage of multiple processors, you'd need at least > as many TSD pointers as CPUs. Julian discussed this in a previous > response. Sure you can. But you can't share the same page map between all the threads (or at least between all the kernel threads that are executing in the process). The costs have been discussed. I didn't say it was going to be convenient or that it wouldn't make a difference to the cost of rescheduling a kernel thread onto a new user thread. Whether these costs are worthwhile, or whether the same effect can be achieved more effectively, is surely the point of the discussion. James To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message