From owner-freebsd-threads@FreeBSD.ORG Mon Jul 5 23:55:48 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E149016A4CE for ; Mon, 5 Jul 2004 23:55:48 +0000 (GMT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9230C43D31 for ; Mon, 5 Jul 2004 23:55:48 +0000 (GMT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i65NtffP025039; Mon, 5 Jul 2004 19:55:41 -0400 (EDT) Date: Mon, 5 Jul 2004 19:55:41 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Julian Elischer In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Andrew Gallatin cc: freebsd-threads@freebsd.org Subject: Re: pthread switch (was Odd KSE panic) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Jul 2004 23:55:49 -0000 On Mon, 5 Jul 2004, Julian Elischer wrote: > On Mon, 5 Jul 2004, Daniel Eischen wrote: > > > > It doesn't matter which thread gets run after the I/O thread > > calls pthread_cond_signal(). Either way, the I/O thread has > > to reenter the kernel and wait for the next event. And that > > time adds to the latency of the worker thread the _next_ time. > > not assuming that the worker thread tries to see if there is more work > before it yields. > > All I'm saying is that the app should decide the priority. > and you agree that it would be quicker in the case of the > 1KSE case? Latency is reduced, but overall throughput(*) is also reduced because of the extra thread switch for every wakeup. (*) Assuming that events occur fast enough. I'll have a look at adding preemption points, but I still have my doubts that it really matters... -- Dan Eischen