Date: Wed, 17 Jan 2001 16:58:14 -0800 (PST) From: Jin Guojun <jin@shasta.panasas.com> To: FreeBSD-gnats-submit@freebsd.org Subject: kern/24418: read/write in thread library (-lc_r) does not do context switch Message-ID: <200101180058.f0I0wEs01319@shasta.panasas.com>
next in thread | raw e-mail | index | archive | help
>Number: 24418 >Category: kern >Synopsis: read/write in thread library (-lc_r) does not do context switch >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jan 17 17:00:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Jin Guojun >Release: FreeBSD 4.2-RELEASE i386 >Organization: >Environment: FreeBSD STABLE and CURRENT >Description: threaded read/write shoule not block on I/O till I/O completion. Blocking on I/O causes thread I/O meaningless. read does context switch on stdin, and this is probably only I/O sys-call that FreeBSD does the context switch on thread. Thread does not do context switch on disk I/O and timed select(). I have not tested accept() and network I/O yet. Linux 2.2.x does not do context switch on thread I/O either, but linux 2.4.0 fixed it. Solaris does this well. Both Solaris and Linux 2.4.0 submit the I/O job to the driver, and immediately switch context to another thread regardless how less the I/O data is. This contest switch utilizes both system CPU and I/O CPU time. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101180058.f0I0wEs01319>