From owner-cvs-all@FreeBSD.ORG Tue Oct 30 02:44:47 2007 Return-Path: Delivered-To: cvs-all@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8EDE16A418; Tue, 30 Oct 2007 02:44:47 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 9650513C4AA; Tue, 30 Oct 2007 02:44:47 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from [127.0.0.1] (root@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l9U2igMF044884; Tue, 30 Oct 2007 02:44:44 GMT (envelope-from davidxu@freebsd.org) Message-ID: <47269AD0.3080906@freebsd.org> Date: Tue, 30 Oct 2007 10:45:36 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.13) Gecko/20070516 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Eischen References: <200710292101.l9TL1mAE049561@repoman.freebsd.org> <47268F17.1000106@freebsd.org> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-src@FreeBSD.org, Kris Kennaway , src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/lib/libthr/thread thr_mutex.c src/lib/libkse/thread thr_mutex.c src/include pthread.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Oct 2007 02:44:47 -0000 Daniel Eischen wrote: > On Tue, 30 Oct 2007, David Xu wrote: > >> I am not sure PTHREAD_MUTEX_ADAPTIVE_NP is a correct solution, in fact >> I think this is Linux crap, shouldn't PTHREAD_PRIO_PROTECT and >> PTHREAD_PRIO_INHERIT mutex be adaptivly spinned ? >> also this commit does not change mutex_self_lock() to handle the >> PTHREAD_MUTEX_ADAPTIVE_NP, what is the PTHREAD_MUTEX_ADAPTIVE_NP >> definition when the mutex is already locked by the currect thread ? >> deadlock or return error code ? > > > I tend to agree with the "Linux crap" comment, but I hesitate > to use those words considering the recent sensor framework > incident ;-) > Isn't this commit an incident too ? :-) if it is not, then we should retire from FreeBSD now, as two thread library maintainers were bypassed. > As I said in previous email, I would rather see our default > mutex implementations improved instead of adding new interfaces. > If it's really necessary in the short term, perhaps an > environment variable that can be set to force all mutexes > to be adaptive (and when kern.smp.cpus > 1 perhaps?). > Yes, an environment variable is good idea. Regards, David Xu