From owner-freebsd-hackers Mon Apr 24 19:54:23 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.rdc1.sfba.home.com (ha1.rdc1.sfba.home.com [24.0.0.66]) by hub.freebsd.org (Postfix) with ESMTP id DEFAF37BD8F for ; Mon, 24 Apr 2000 19:54:15 -0700 (PDT) (envelope-from boshea@ricochet.net) Received: from beastie.localdomain ([24.19.158.41]) by mail.rdc1.sfba.home.com (InterMail v4.01.01.00 201-229-111) with ESMTP id <20000425025415.IBCE12856.mail.rdc1.sfba.home.com@beastie.localdomain>; Mon, 24 Apr 2000 19:54:15 -0700 Received: (from brian@localhost) by beastie.localdomain (8.9.3/8.8.7) id UAA23675; Mon, 24 Apr 2000 20:03:51 -0700 (PDT) (envelope-from brian) Date: Mon, 24 Apr 2000 20:03:51 -0700 From: "Brian O'Shea" To: Chris Costello Cc: "Brian O'Shea" , Daniel Eischen , Jason Evans , A G F Keahan , freebsd-hackers@FreeBSD.ORG Subject: Re: Multithreaded server performance Message-ID: <20000424200351.Y337@beastie.localdomain> Reply-To: boshea@ricochet.net Mail-Followup-To: Chris Costello , Brian O'Shea , Daniel Eischen , Jason Evans , A G F Keahan , freebsd-hackers@FreeBSD.ORG References: <20000424010315.U337@beastie.localdomain> <20000424141957.W337@beastie.localdomain> <20000424170700.A14783@holly.calldei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <20000424170700.A14783@holly.calldei.com>; from Chris Costello on Mon, Apr 24, 2000 at 05:07:00PM -0500 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Apr 24, 2000 at 05:07:00PM -0500, Chris Costello wrote: > FreeBSD's threads implement has its own read() function which > will make a non-blocking read() call (using the _real_ syscall) > for the specified amount of bytes. Now a non-blocking read() > call fails unless all the data in nbytes can be read into buf. > So our implementation will continue to do a non-blocking read > until all the data can be copied and then allows the thread > continue, thus blocking only the calling thread. > > At least that's what the source code tells me. Yea, I took a look at lib/libc_r/uthread/uthread_read.c too, but it didn't paint the whole picture for me. Specifically, I couldn't find the definition for the _thread_sys_read() function. It looks like the polling magic to which Jason Evans referred occurs in some interesting code in uthread_kern.c, though. Thanks, -brian -- Brian O'Shea boshea@ricochet.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message