From owner-freebsd-bugs Wed Jan 17 17: 0:19 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5AB9737B69C for ; Wed, 17 Jan 2001 17:00:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f0I101M28056; Wed, 17 Jan 2001 17:00:01 -0800 (PST) (envelope-from gnats) Received: from shasta.panasas.com (dsl-237-43-22-64.cust.dslnetworks.net [64.22.43.237]) by hub.freebsd.org (Postfix) with ESMTP id 2113C37B400 for ; Wed, 17 Jan 2001 16:58:16 -0800 (PST) Received: (from jin@localhost) by shasta.panasas.com (8.11.1/8.11.1) id f0I0wEs01319; Wed, 17 Jan 2001 16:58:14 -0800 (PST) (envelope-from jin) Message-Id: <200101180058.f0I0wEs01319@shasta.panasas.com> Date: Wed, 17 Jan 2001 16:58:14 -0800 (PST) From: Jin Guojun Reply-To: jin@panasas.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/24418: read/write in thread library (-lc_r) does not do context switch Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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