From owner-freebsd-current Tue Apr 17 21:39:25 2001 Delivered-To: freebsd-current@freebsd.org Received: from netbank.com.br (garrincha.netbank.com.br [200.203.199.88]) by hub.freebsd.org (Postfix) with ESMTP id 3E72437B422 for ; Tue, 17 Apr 2001 21:39:22 -0700 (PDT) (envelope-from riel@conectiva.com.br) Received: from surriel.ddts.net (1-114.cwb-adsl.brasiltelecom.net.br [200.193.160.114]) by netbank.com.br (Postfix) with ESMTP id CB64946805; Wed, 18 Apr 2001 01:40:06 -0300 (BRST) Received: from localhost (tmogbd@localhost [127.0.0.1]) by surriel.ddts.net (8.11.2/8.11.2) with ESMTP id f3I4cEf01755; Wed, 18 Apr 2001 01:38:25 -0300 Date: Wed, 18 Apr 2001 01:38:14 -0300 (BRST) From: Rik van Riel X-Sender: riel@imladris.rielhome.conectiva To: "E.B. Dreger" Cc: Matt Dillon , Alfred Perlstein , Greg Lehey , "Justin T. Gibbs" , Doug Barton , "current @ freebsd . org" Subject: Re: Kernel preemption, yes or no? (was: Filesystem gets a huge performance boost) In-Reply-To: Message-ID: X-spambait: aardvark@kernelnewbies.org X-spammeplease: aardvark@nl.linux.org MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 18 Apr 2001, E.B. Dreger wrote: > For minimal CPU utilization, it would be nice skip task switching, > period. Run something to completion, then go on to the next task. > Poll without ever using an interrupt. [snip] > Hence, my philosophy is that task switching and preemption are > necessary evils because hardware does not perfectly accomodate > software. If we must, we must... otherwise, use co-op switching as > the next best thing to straight run-to-completion. Except that for the [extremely performance critical] interrupt handlers the "software" is under control of the folks who write the OS. You need preemption for userspace because it's possibly "hostile" software, but things like the interrupt handlers and the kernel code are under your control ... this means you can code it to be as efficient as possible without impacting latency too much. regards, Rik -- Virtual memory is like a game you can't win; However, without VM there's truly nothing to lose... http://www.surriel.com/ http://www.conectiva.com/ http://distro.conectiva.com.br/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message