From owner-freebsd-threads@FreeBSD.ORG Thu Jul 6 12:10:22 2006 Return-Path: X-Original-To: threads@freebsd.org 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 D0AD216A4FB; Thu, 6 Jul 2006 12:10:22 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44C2143D45; Thu, 6 Jul 2006 12:10:22 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.ntplx.net (8.13.6/8.13.6/NETPLEX) with ESMTP id k66CALDF000371; Thu, 6 Jul 2006 08:10:21 -0400 (EDT) Date: Thu, 6 Jul 2006 08:10:21 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: David Xu In-Reply-To: <200607032020.10993.davidxu@freebsd.org> Message-ID: References: <20060703101554.Q26325@fledge.watson.org> <200607032020.10993.davidxu@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) Cc: threads@freebsd.org, Robert Watson , freebsd-threads@freebsd.org Subject: Re: Strawman proposal: making libthr default thread implementation? X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Eischen List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jul 2006 12:10:22 -0000 On Mon, 3 Jul 2006, David Xu wrote: > but reality is, mysql is using system scope in libpthread to get better > performance but not process scope thread. in the real world, these > nominal features are also not used widely, using it can only cause > serious performance problem in most applications, until you need hard > realtime, but why do you use FreeBSD if you need hard realtime ? > there are dedicated systems which are designed for this requirement. > I still does not find an application really need this feature. Also > I don't think one can easily implement a modern CPU friendly scheduler > in userland, HTT, shared L2 dual-core, NUMA scheduling, doing it in kernel is > already extreme diffcult, putting lots of effort in single library but other > single threaded application still gain nothing is also not worthy to work > on M:N thread library. I don't need hard real-time, but would like to be able to use FreeBSD for soft real-time. And note that if an application specifies SCHED_RR, SCHED_FIFO, or SCHED_SPORADIC, it doesn't matter if you have HTT, L2 dual-core, NUMA, whatever. Optimizing for those is just fine (for SCHED_OTHER), but in the presence of one of the above scheduling attributes it means _nothing_. libpthread uses SCHED_RR by default (SCHED_OTHER = SCHED_RR), but there is no reason that it couldn't just let the kernel schedule threads any way it wants (even without upcalls) by default (for SCHED_OTHER). -- DE