Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Apr 2000 20:03:51 -0700
From:      "Brian O'Shea" <boshea@ricochet.net>
To:        Chris Costello <chris@calldei.com>
Cc:        "Brian O'Shea" <boshea@ricochet.net>, Daniel Eischen <eischen@vigrid.com>, Jason Evans <jasone@canonware.com>, A G F Keahan <ak@freenet.co.uk>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: Multithreaded server performance
Message-ID:  <20000424200351.Y337@beastie.localdomain>
In-Reply-To: <20000424170700.A14783@holly.calldei.com>; from Chris Costello on Mon, Apr 24, 2000 at 05:07:00PM -0500
References:  <20000424010315.U337@beastie.localdomain> <Pine.SUN.3.91.1000424061006.7393A-100000@pcnet1.pcnet.com> <20000424141957.W337@beastie.localdomain> <20000424170700.A14783@holly.calldei.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000424200351.Y337>