From owner-freebsd-arch Sun Nov 28 14:33:27 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id E227814C1E for ; Sun, 28 Nov 1999 14:33:22 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id XAA28598 for ; Sun, 28 Nov 1999 23:33:21 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id XAA59918 for freebsd-arch@freebsd.org; Sun, 28 Nov 1999 23:33:21 +0100 (MET) Received: from alpo.whistle.com (alpo.whistle.com [207.76.204.38]) by hub.freebsd.org (Postfix) with ESMTP id C3D2B156D6 for ; Sun, 28 Nov 1999 14:32:53 -0800 (PST) (envelope-from julian@whistle.com) Received: from current1.whiste.com (current1.whistle.com [207.76.205.22]) by alpo.whistle.com (8.9.1a/8.9.1) with ESMTP id OAA26506; Sun, 28 Nov 1999 14:32:50 -0800 (PST) Date: Sun, 28 Nov 1999 14:32:50 -0800 (PST) From: Julian Elischer To: "Richard Seaman, Jr." Cc: arch@freebsd.org Subject: syscall overhead. In-Reply-To: <19991128111949.O1408@tar.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 28 Nov 1999, Richard Seaman, Jr. wrote: > FYI, some measurements I did with the Linuxthreads "port" (ie. > native FreeBSD kernel threads using the linux threads code) on a > 266Mhz AMD processor showed the ability to do about 150,000 > kernel thread context switches/sec. The threads didn't do anything > other than context switch, so a "real world" context switch might > be slower, and the rate varies somewhat with the number of threads. > This was uniprocessor, not SMP. > > This suggests that kernel thread context switches, to have a measureable > impact on performance at even the 1% level, have to be occurring > at the rate of 1,500/sec or more. With a faster processor, and > the optimizations you suggest, I'm sure you might well be talking > 10,000 switches/sec to matter. > > I don't have any threaded apps that come close to this, but perhaps > they exist. And, unless you can fix the "user thread" scheduler so > it doesn't make any syscalls, its hard to see much of an advantage > for user thread context switches over kernel thread context switches, > from a performance standpoint. (The current user thread scheduler > can actually be slower at context switches that kernel threads, > because of the nubmer of syscalls it makes). > yes but have we catalogued those calls? I am guessing that we can probably get rid of a lot of them by appropriate kernel support. For example threads blocking and unblocking signals for various reasons.. I'm certain we could do the same lazy blocking that the kernel presently does So that blocking a signal would be simply a case of setting a bit. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message