From owner-freebsd-threads@FreeBSD.ORG Sun Jan 16 21:39:08 2005 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 568B016A4CE; Sun, 16 Jan 2005 21:39:08 +0000 (GMT) Received: from park.rambler.ru (park.rambler.ru [81.19.64.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id D25F843D53; Sun, 16 Jan 2005 21:39:06 +0000 (GMT) (envelope-from is@rambler-co.ru) Received: from is.park.rambler.ru (is.park.rambler.ru [81.19.64.102]) by park.rambler.ru (8.13.1/8.13.1) with ESMTP id j0GLd54j088305; Mon, 17 Jan 2005 00:39:05 +0300 (MSK) (envelope-from is@rambler-co.ru) Date: Mon, 17 Jan 2005 00:39:05 +0300 (MSK) From: Igor Sysoev X-X-Sender: is@is.park.rambler.ru To: David Xu In-Reply-To: <41E318C2.3040304@freebsd.org> Message-ID: <20050117001919.B35122@is.park.rambler.ru> References: <41DCEA91.6040402@he.iki.fi> <41DCFD2F.2040207@freebsd.org> <41E0256A.1000801@he.iki.fi> <41E318C2.3040304@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed cc: freebsd-threads@freebsd.org Subject: Re: higher speed mutexes 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: Sun, 16 Jan 2005 21:39:08 -0000 On Tue, 11 Jan 2005, David Xu wrote: > Petri Helenius wrote: >> >> What happens if the process holding the lock dies? >> >>> In detail, I don't use thr_suspend and thr_wakeup, I use more reliable >>> way: >>> umtx_wait + umtx_wake, I have added them into kernel sometimes ago. >>> >> I was looking at the umtx routines and wondering if I could use them >> instead of pthread API. >> > I will add owner list, when a thread blocked on umtx, an owner list > will be created for the umtx, and blocked thread will lookup the owner > in system, if there is no the owner, the owner was dead, kernel marks > the umtx is in broken state, next locker will find the brokeness, and > still gets the lock successfully but with errno is EPIPE, if a thread exits > with its owner list not empty, in thr_exit, kernel will mark all umtxes > to broken state, and wake up a waiter on each umtx, the waiter should > find the brokeness...., it will let do priority proction and priority inherit > mutex for POSIX..., I am looking for time to do it.... Is it possible to add the kqueue notification when a busy mutex will be freed ? Something like _umtx_op(umtx, UMTX_OP_EVENT_LOCK, id, kqueue, timeout); If the mutex is free, UMTX_OP_EVENT_LOCK operate as UMTX_OP_LOCK. But if the mutex is busy, UMTX_OP_EVENT_LOCK should register the mutex event to the kqueue and return EBUSY (and so). When the mutex will be freed, the application will received the EVFILT_UMTX event. However, kernel should not lock the mutex that was just freed, but it should only notify about freeing. Igor Sysoev http://sysoev.ru/en/ From owner-freebsd-threads@FreeBSD.ORG Mon Jan 17 11:02:23 2005 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 F0FB416A56B for ; Mon, 17 Jan 2005 11:02:22 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C4D443D41 for ; Mon, 17 Jan 2005 11:02:22 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0HB2M0f071296 for ; Mon, 17 Jan 2005 11:02:22 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0HB2L8j071290 for freebsd-threads@freebsd.org; Mon, 17 Jan 2005 11:02:21 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 17 Jan 2005 11:02:21 GMT Message-Id: <200501171102.j0HB2L8j071290@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Subject: Current problem reports assigned to you 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, 17 Jan 2005 11:02:23 -0000 Current FreeBSD problem reports Critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2004/04/22] threads/65883threads libkse's sigwait does not work after fork o [2005/01/04] threads/75795threads applications linked with -lc_r can't clos 2 problems total. Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/07/18] kern/20016 threads pthreads: Cannot set scheduling timer/Can o [2000/08/26] kern/20861 threads libc_r does not honor socket timeouts o [2001/01/20] threads/24472threads libc_r does not honor SO_SNDTIMEO/SO_RCVT o [2001/01/25] threads/24632threads libc_r delicate deviation from libc in ha o [2001/01/25] kern/24641 threads pthread_rwlock_rdlock can deadlock o [2001/11/26] bin/32295 threads pthread dont dequeue signals o [2002/02/01] threads/34536threads accept() blocks other threads o [2002/05/25] kern/38549 threads the procces compiled whith pthread stoppe o [2002/06/27] threads/39922threads [PATCH?] Threaded applications executed w o [2002/08/04] kern/41331 threads Pthread library open sets O_NONBLOCK flag o [2003/03/02] threads/48856threads Setting SIGCHLD to SIG_IGN still leaves z o [2003/03/10] threads/49087threads Signals lost in programs linked with libc o [2003/05/08] threads/51949threads thread in accept cannot be cancelled s [2004/03/15] kern/64313 threads FreeBSD (OpenBSD) pthread implicit set/un o [2004/08/26] threads/70975threads unexpected and unreliable behaviour when o [2004/09/14] threads/71725threads Mysql Crashes frequently giving Sock Erro o [2004/10/05] threads/72353threads Assertion fails in /usr/src/lib/libpthrea o [2004/10/07] threads/72429threads threads blocked in stdio (fgets, etc) are o [2004/10/21] threads/72953threads fork() unblocks blocked signals w/o PTHRE o [2004/11/25] threads/74370threads Cannot get lwp 0 registers in gdb o [2004/12/08] threads/74856threads dig/host broken w/ libthr o [2004/12/19] threads/75273threads FBSD 5.3 libpthread (KSE) bug o [2004/12/21] threads/75374threads pthread_kill() ignores SA_SIGINFO flag 23 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/05/26] kern/18824 threads gethostbyname is not thread safe o [2000/06/13] kern/19247 threads uthread_sigaction.c does not do anything o [2000/10/21] kern/22190 threads A threaded read(2) from a socketpair(2) f o [2001/09/09] threads/30464threads pthread mutex attributes -- pshared o [2002/05/02] threads/37676threads libc_r: msgsnd(), msgrcv(), pread(), pwri s [2002/07/16] threads/40671threads pthread_cancel doesn't remove thread from o [2004/07/13] threads/69020threads pthreads library leaks _gc_mutex o [2004/09/21] threads/71966threads Mlnet Core Dumped : Fatal error '_pq_inse o [2004/11/21] threads/74180threads KSE problem. Applications those riched ma 9 problems total. From owner-freebsd-threads@FreeBSD.ORG Tue Jan 18 14:10:36 2005 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 1728D16A506 for ; Tue, 18 Jan 2005 14:10:36 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEEB043D5C; Tue, 18 Jan 2005 14:10:35 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0IEAVHZ013244; Tue, 18 Jan 2005 14:10:34 GMT (envelope-from davidxu@freebsd.org) Message-ID: <41ED18D5.80304@freebsd.org> Date: Tue, 18 Jan 2005 22:10:29 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041226 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Petri Helenius References: <41DCEA91.6040402@he.iki.fi> <41DCFD2F.2040207@freebsd.org> <41DD01CE.70004@he.iki.fi> <41DFED9A.8070202@freebsd.org> <41E0256A.1000801@he.iki.fi> In-Reply-To: <41E0256A.1000801@he.iki.fi> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: higher speed mutexes 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: Tue, 18 Jan 2005 14:10:36 -0000 I have put it at: http://people.freebsd.org/~davidxu/libthread.fbsd.tgz Anyone wants to see how fast supersmack can be on FreeBSD should try it. Note, it should be run on newest -CURRENT kernel code, as umtx interface is still under changing, you may miss some changes. David Xu From owner-freebsd-threads@FreeBSD.ORG Tue Jan 18 17:46:20 2005 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 3C50A16A4CE; Tue, 18 Jan 2005 17:46:20 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1020F43D49; Tue, 18 Jan 2005 17:46:17 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id B481B7A403; Tue, 18 Jan 2005 09:46:16 -0800 (PST) Message-ID: <41ED4B68.6090803@elischer.org> Date: Tue, 18 Jan 2005 09:46:16 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: David Xu References: <41DCEA91.6040402@he.iki.fi> <41DCFD2F.2040207@freebsd.org> <41DD01CE.70004@he.iki.fi> <41DFED9A.8070202@freebsd.org> <41E0256A.1000801@he.iki.fi> <41ED18D5.80304@freebsd.org> In-Reply-To: <41ED18D5.80304@freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: higher speed mutexes 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: Tue, 18 Jan 2005 17:46:20 -0000 David Xu wrote: > I have put it at: > http://people.freebsd.org/~davidxu/libthread.fbsd.tgz > > Anyone wants to see how fast supersmack can be on FreeBSD > should try it. Oh come on.. give us some numbers :-) > > Note, it should be run on newest -CURRENT kernel code, as > umtx interface is still under changing, you may miss some changes. > > David Xu > > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to > "freebsd-threads-unsubscribe@freebsd.org" From owner-freebsd-threads@FreeBSD.ORG Tue Jan 18 23:40:33 2005 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 0F4FC16A4CE for ; Tue, 18 Jan 2005 23:40:33 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BC3B543D2D; Tue, 18 Jan 2005 23:40:32 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0INeURP082643; Tue, 18 Jan 2005 23:40:32 GMT (envelope-from davidxu@freebsd.org) Message-ID: <41ED9E6D.4000509@freebsd.org> Date: Wed, 19 Jan 2005 07:40:29 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041226 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: <41DCEA91.6040402@he.iki.fi> <41DCFD2F.2040207@freebsd.org> <41DD01CE.70004@he.iki.fi> <41DFED9A.8070202@freebsd.org> <41E0256A.1000801@he.iki.fi> <41ED18D5.80304@freebsd.org> <41ED4B68.6090803@elischer.org> In-Reply-To: <41ED4B68.6090803@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: higher speed mutexes 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: Tue, 18 Jan 2005 23:40:34 -0000 Julian Elischer wrote: > > > David Xu wrote: > >> I have put it at: >> http://people.freebsd.org/~davidxu/libthread.fbsd.tgz >> >> Anyone wants to see how fast supersmack can be on FreeBSD >> should try it. > > > > Oh come on.. give us some numbers :-) > Linuxthreads: ============================================ Script started on Mon Jan 17 19:16:10 2005 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 1000 Query Barrel Report for client smacker connect: max=12ms min=2ms avg= 7ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 10000 3 0 1425.98 update_index 10000 5 0 1425.98 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 1000 Query Barrel Report for client smacker connect: max=10ms min=2ms avg= 6ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 10000 7 0 1423.48 update_index 10000 4 0 1423.48 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> ./sup-super-smack ./update-select.smack 50 10000 Query Barrel Report for client smacker connect: max=59ms min=2ms avg= 30ms from 50 clients Query_type num_queries max_time min_time q_per_s select_index 500000 26 0 1283.48 update_index 500000 23 0 1283.48 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> exit exit Script done on Mon Jan 17 19:24:40 2005 ============================================= libthread: Script started on Mon Jan 17 19:27:21 2005 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 1000 Query Barrel Report for client smacker connect: max=12ms min=2ms avg= 6ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 10000 4 0 1650.14 update_index 10000 4 0 1650.14 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 1000 Query Barrel Report for client smacker connect: max=15ms min=2ms avg= 7ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 10000 5 0 1664.94 update_index 10000 3 0 1664.94 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 100050 10000 Query Barrel Report for client smacker connect: max=82ms min=2ms avg= 40ms from 50 clients Query_type num_queries max_time min_time q_per_s select_index 500000 25 0 1485.13 update_index 500000 17 0 1485.13 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> exit exit Script done on Mon Jan 17 19:33:41 2005 From owner-freebsd-threads@FreeBSD.ORG Tue Jan 18 23:47:17 2005 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 0DC6616A4CE; Tue, 18 Jan 2005 23:47:17 +0000 (GMT) Received: from pinus.cc.fer.hr (pinus.cc.fer.hr [161.53.73.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15A8D43D53; Tue, 18 Jan 2005 23:47:16 +0000 (GMT) (envelope-from ivoras@fer.hr) Received: from [161.53.72.113] (lara.cc.fer.hr [161.53.72.113]) by pinus.cc.fer.hr (8.12.2/8.12.2) with ESMTP id j0INxi5B020671; Wed, 19 Jan 2005 00:59:44 +0100 (MET) Message-ID: <41ED9FF3.9040001@fer.hr> Date: Wed, 19 Jan 2005 00:46:59 +0100 From: Ivan Voras User-Agent: Mozilla Thunderbird 1.0 (X11/20041213) X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Xu References: <41DCEA91.6040402@he.iki.fi> <41DCFD2F.2040207@freebsd.org> <41DD01CE.70004@he.iki.fi> <41DFED9A.8070202@freebsd.org> <41E0256A.1000801@he.iki.fi> <41ED18D5.80304@freebsd.org> <41ED4B68.6090803@elischer.org> <41ED9E6D.4000509@freebsd.org> In-Reply-To: <41ED9E6D.4000509@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: higher speed mutexes 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: Tue, 18 Jan 2005 23:47:17 -0000 David Xu wrote: >> Oh come on.. give us some numbers :-) >> > Linuxthreads: > libthread: What about regular libpthread on the same setup (machine)? From owner-freebsd-threads@FreeBSD.ORG Wed Jan 19 00:19:05 2005 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 ED61C16A4CE; Wed, 19 Jan 2005 00:19:04 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id A26C843D1D; Wed, 19 Jan 2005 00:19:04 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id 726617A403; Tue, 18 Jan 2005 16:19:04 -0800 (PST) Message-ID: <41EDA778.70605@elischer.org> Date: Tue, 18 Jan 2005 16:19:04 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: David Xu References: <41DCEA91.6040402@he.iki.fi> <41DCFD2F.2040207@freebsd.org> <41DD01CE.70004@he.iki.fi> <41DFED9A.8070202@freebsd.org> <41E0256A.1000801@he.iki.fi> <41ED18D5.80304@freebsd.org> <41ED4B68.6090803@elischer.org> <41ED9E6D.4000509@freebsd.org> In-Reply-To: <41ED9E6D.4000509@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: higher speed mutexes 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: Wed, 19 Jan 2005 00:19:05 -0000 David Xu wrote: > Julian Elischer wrote: > >> >> >> David Xu wrote: >> >>> I have put it at: >>> http://people.freebsd.org/~davidxu/libthread.fbsd.tgz >>> >>> Anyone wants to see how fast supersmack can be on FreeBSD >>> should try it. >> >> >> >> >> Oh come on.. give us some numbers :-) >> > Linuxthreads: > ============================================ > Script started on Mon Jan 17 19:16:10 2005 > davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack > ./update-select.smack 10 1000 Query Barrel Report for client smacker > connect: max=12ms min=2ms avg= 7ms from 10 clients Query_type > num_queries max_time min_time q_per_s > select_index 10000 3 0 1425.98 > update_index 10000 5 0 1425.98 > davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack > ./update-select.smack 10 1000 Query Barrel Report for client smacker > connect: max=10ms min=2ms avg= 6ms from 10 clients Query_type > num_queries max_time min_time q_per_s > select_index 10000 7 0 1423.48 > update_index 10000 4 0 1423.48 > davidxu@alona:/home/davidxu/super-smack-1.2/smacks> ./sup-super-smack > ./update-select.smack 50 10000 Query Barrel Report for client smacker > connect: max=59ms min=2ms avg= 30ms from 50 clients Query_type > num_queries max_time min_time q_per_s > select_index 500000 26 0 1283.48 > update_index 500000 23 0 1283.48 > davidxu@alona:/home/davidxu/super-smack-1.2/smacks> exit exit > > Script done on Mon Jan 17 19:24:40 2005 > > ============================================= > > libthread: > Script started on Mon Jan 17 19:27:21 2005 > davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack > ./update-select.smack 10 1000 Query Barrel Report for client smacker > connect: max=12ms min=2ms avg= 6ms from 10 clients Query_type > num_queries max_time min_time q_per_s > select_index 10000 4 0 1650.14 > update_index 10000 4 0 1650.14 > davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack > ./update-select.smack 10 1000 Query Barrel Report for client smacker > connect: max=15ms min=2ms avg= 7ms from 10 clients Query_type > num_queries max_time min_time q_per_s > select_index 10000 5 0 1664.94 > update_index 10000 3 0 1664.94 > davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack > ./update-select.smack 10 100050 10000 Query > Barrel Report for client smacker > connect: max=82ms min=2ms avg= 40ms from 50 clients Query_type > num_queries max_time min_time q_per_s > select_index 500000 25 0 1485.13 > update_index 500000 17 0 1485.13 > davidxu@alona:/home/davidxu/super-smack-1.2/smacks> exit exit out of curiosity, where do libthr and libpthread come in? > > > Script done on Mon Jan 17 19:33:41 2005 > > _______________________________________________ > freebsd-threads@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-threads > To unsubscribe, send any mail to > "freebsd-threads-unsubscribe@freebsd.org" From owner-freebsd-threads@FreeBSD.ORG Wed Jan 19 11:21:13 2005 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 A41EE16A4CF for ; Wed, 19 Jan 2005 11:21:13 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66E2D43D5F; Wed, 19 Jan 2005 11:21:13 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0JBL8W7099764; Wed, 19 Jan 2005 11:21:10 GMT (envelope-from davidxu@freebsd.org) Message-ID: <41EE42A2.8070906@freebsd.org> Date: Wed, 19 Jan 2005 19:21:06 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041226 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Julian Elischer References: <41DCEA91.6040402@he.iki.fi> <41DCFD2F.2040207@freebsd.org> <41DD01CE.70004@he.iki.fi> <41DFED9A.8070202@freebsd.org> <41E0256A.1000801@he.iki.fi> <41ED18D5.80304@freebsd.org> <41ED4B68.6090803@elischer.org> <41ED9E6D.4000509@freebsd.org> <41EDA778.70605@elischer.org> In-Reply-To: <41EDA778.70605@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: higher speed mutexes 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: Wed, 19 Jan 2005 11:21:13 -0000 Julian Elischer wrote: > > > David Xu wrote: > >> Julian Elischer wrote: >> >>> >>> >>> David Xu wrote: >>> >>>> I have put it at: >>>> http://people.freebsd.org/~davidxu/libthread.fbsd.tgz >>>> >>>> Anyone wants to see how fast supersmack can be on FreeBSD >>>> should try it. >>> >>> >>> >>> >>> >>> Oh come on.. give us some numbers :-) >>> >> Linuxthreads: >> ============================================ >> Script started on Mon Jan 17 19:16:10 2005 >> davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack >> ./update-select.smack 10 1000 Query Barrel Report for client smacker >> connect: max=12ms min=2ms avg= 7ms from 10 clients Query_type >> num_queries max_time min_time q_per_s >> select_index 10000 3 0 1425.98 >> update_index 10000 5 0 1425.98 >> davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack >> ./update-select.smack 10 1000 Query Barrel Report for client smacker >> connect: max=10ms min=2ms avg= 6ms from 10 clients Query_type >> num_queries max_time min_time q_per_s >> select_index 10000 7 0 1423.48 >> update_index 10000 4 0 1423.48 >> davidxu@alona:/home/davidxu/super-smack-1.2/smacks> ./sup-super-smack >> ./update-select.smack 50 10000 Query Barrel Report for client smacker >> connect: max=59ms min=2ms avg= 30ms from 50 clients Query_type >> num_queries max_time min_time q_per_s >> select_index 500000 26 0 1283.48 >> update_index 500000 23 0 1283.48 >> davidxu@alona:/home/davidxu/super-smack-1.2/smacks> exit exit >> >> Script done on Mon Jan 17 19:24:40 2005 >> >> ============================================= >> >> libthread: >> Script started on Mon Jan 17 19:27:21 2005 >> davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack >> ./update-select.smack 10 1000 Query Barrel Report for client smacker >> connect: max=12ms min=2ms avg= 6ms from 10 clients Query_type >> num_queries max_time min_time q_per_s >> select_index 10000 4 0 1650.14 >> update_index 10000 4 0 1650.14 >> davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack >> ./update-select.smack 10 1000 Query Barrel Report for client smacker >> connect: max=15ms min=2ms avg= 7ms from 10 clients Query_type >> num_queries max_time min_time q_per_s >> select_index 10000 5 0 1664.94 >> update_index 10000 3 0 1664.94 >> davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack >> ./update-select.smack 10 100050 10000 Query >> Barrel Report for client smacker >> connect: max=82ms min=2ms avg= 40ms from 50 clients Query_type >> num_queries max_time min_time q_per_s >> select_index 500000 25 0 1485.13 >> update_index 500000 17 0 1485.13 >> davidxu@alona:/home/davidxu/super-smack-1.2/smacks> exit exit > > > > out of curiosity, where do libthr and libpthread come in? > ============================================ libpthread: Script started on Wed Jan 19 19:01:39 2005 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 1000 Query Barrel Report for client smacker connect: max=10ms min=8ms avg= 8ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 10000 4 0 1265.38 update_index 10000 3 0 1265.38 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 1000 Query Barrel Report for client smacker connect: max=8ms min=2ms avg= 6ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 10000 4 0 1296.71 update_index 10000 5 0 1296.71 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./pupdate-select.smack 50 10000 Query Barrel Report for client smacker connect: max=57ms min=1ms avg= 35ms from 50 clients Query_type num_queries max_time min_time q_per_s select_index 500000 27 0 1267.85 update_index 500000 23 0 1267.85 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> exit exit Script done on Wed Jan 19 19:09:10 2005 ======================================= libthr: Script started on Wed Jan 19 18:52:36 2005 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 1000 Query Barrel Report for client smacker connect: max=14ms min=2ms avg= 7ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 10000 3 1 1512.39 update_index 10000 3 0 1512.39 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 1000 Query Barrel Report for client smacker connect: max=15ms min=3ms avg= 8ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 10000 5 0 1537.13 update_index 10000 3 0 1537.13 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 50 10000 Query Barrel Report for client smacker connect: max=93ms min=1ms avg= 47ms from 50 clients Query_type num_queries max_time min_time q_per_s select_index 500000 23 0 1354.00 update_index 500000 19 0 1354.00 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> exit exit Script done on Wed Jan 19 18:59:59 2005 ============================================= libc_r: Script started on Wed Jan 19 19:10:05 2005 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 1000 Query Barrel Report for client smacker connect: max=9ms min=2ms avg= 6ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 10000 4 0 1377.04 update_index 10000 3 0 1377.04 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./update-select.smack 10 1000 Query Barrel Report for client smacker connect: max=8ms min=2ms avg= 5ms from 10 clients Query_type num_queries max_time min_time q_per_s select_index 10000 7 0 1364.92 update_index 10000 4 0 1364.92 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> super-smack ./uipdate-select.sdmack 150 10000 Query Barrel Report for client smacker connect: max=37ms min=5ms avg= 28ms from 50 clients Query_type num_queries max_time min_time q_per_s select_index 500000 20 1 1305.62 update_index 500000 19 2 1305.62 davidxu@alona:/home/davidxu/super-smack-1.2/smacks> From owner-freebsd-threads@FreeBSD.ORG Thu Jan 20 19:20:25 2005 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E78916A4CE for ; Thu, 20 Jan 2005 19:20:25 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1303A43D31 for ; Thu, 20 Jan 2005 19:20:25 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0KJKOwL056968 for ; Thu, 20 Jan 2005 19:20:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0KJKOkZ056967; Thu, 20 Jan 2005 19:20:24 GMT (envelope-from gnats) Resent-Date: Thu, 20 Jan 2005 19:20:24 GMT Resent-Message-Id: <200501201920.j0KJKOkZ056967@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-threads@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, justin@arl.army.mil Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F43716A4CE for ; Thu, 20 Jan 2005 19:18:14 +0000 (GMT) Received: from pong.arl.army.mil (pong.arl.army.mil [128.63.32.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9778F43D1F for ; Thu, 20 Jan 2005 19:18:13 +0000 (GMT) (envelope-from justin@pong.arl.army.mil) Received: from pong.arl.army.mil (localhost.arl.army.mil [127.0.0.1]) by pong.arl.army.mil (8.13.1/8.13.1) with ESMTP id j0KJIxlF046973; Thu, 20 Jan 2005 14:18:59 -0500 (EST) (envelope-from justin@pong.arl.army.mil) Received: (from justin@localhost) by pong.arl.army.mil (8.13.1/8.13.1/Submit) id j0KJIxRi046972; Thu, 20 Jan 2005 14:18:59 -0500 (EST) (envelope-from justin) Message-Id: <200501201918.j0KJIxRi046972@pong.arl.army.mil> Date: Thu, 20 Jan 2005 14:18:59 -0500 (EST) From: justin@arl.army.mil To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: justin@arl.army.mil Subject: threads/76513: libpthread is not working X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: justin@arl.army.mil List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2005 19:20:25 -0000 >Number: 76513 >Category: threads >Synopsis: libpthread is not working >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-threads >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jan 20 19:20:24 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Justin Shumaker >Release: FreeBSD 5.3-RELEASE i386 >Organization: >Environment: System: FreeBSD pong.arl.army.mil 5.3-RELEASE FreeBSD 5.3-RELEASE #0: Fri Dec 10 14:00:54 EST 2004 justin@pong.arl.army.mil:/usr/src/sys/i386/compile/SMP i386 >Description: libpthread is crashing when multiple threads are working inside of a loop that is thread-safe inside of my ray-tracer. When I set libmap to use libc_r instead of libpthread everything just works. Using libpthread with just 1 thread also works just fine. >How-To-Repeat: Cannoy paste my example code, not open source, try making a simple multithreaded program using libpthread. >Fix: No idea. >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-threads@FreeBSD.ORG Thu Jan 20 21:17:58 2005 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 6972816A4CE; Thu, 20 Jan 2005 21:17:58 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 11B9F43D1D; Thu, 20 Jan 2005 21:17:58 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j0KLHtua000435; Thu, 20 Jan 2005 16:17:56 -0500 (EST) Date: Thu, 20 Jan 2005 16:17:55 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: justin@arl.army.mil In-Reply-To: <200501201918.j0KJIxRi046972@pong.arl.army.mil> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: FreeBSD-gnats-submit@freebsd.org cc: freebsd-threads@freebsd.org Subject: Re: threads/76513: libpthread is not working X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 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, 20 Jan 2005 21:17:58 -0000 > > >Description: > libpthread is crashing when multiple threads are working inside of a loop > that is thread-safe inside of my ray-tracer. When I set libmap to use libc_r > instead of libpthread everything just works. Using libpthread with just 1 thread > also works just fine. > >How-To-Repeat: > Cannoy paste my example code, not open source, try making a simple > multithreaded program using libpthread. You're going to need to provide more information than that. We have many multithreaded programs using libpthread, so the How-To-Repeat isn't very helpful. There were also bugs in 5.3-release that have been fixed since, so you can also try updating to -stable or -current. Also, if you are using nvidia provided drivers, they are not thread-safe with libpthread. -- DE From owner-freebsd-threads@FreeBSD.ORG Thu Jan 20 21:20:27 2005 Return-Path: Delivered-To: freebsd-threads@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C4EA16A4E8 for ; Thu, 20 Jan 2005 21:20:27 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B53D343D1D for ; Thu, 20 Jan 2005 21:20:20 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0KLKK3t070093 for ; Thu, 20 Jan 2005 21:20:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0KLKKjJ070092; Thu, 20 Jan 2005 21:20:20 GMT (envelope-from gnats) Date: Thu, 20 Jan 2005 21:20:20 GMT Message-Id: <200501202120.j0KLKKjJ070092@freefall.freebsd.org> To: freebsd-threads@FreeBSD.org From: Daniel Eischen Subject: Re: threads/76513: libpthread is not working X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 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, 20 Jan 2005 21:20:28 -0000 The following reply was made to PR threads/76513; it has been noted by GNATS. From: Daniel Eischen To: justin@arl.army.mil Cc: FreeBSD-gnats-submit@freebsd.org, Subject: Re: threads/76513: libpthread is not working Date: Thu, 20 Jan 2005 16:17:55 -0500 (EST) > > >Description: > libpthread is crashing when multiple threads are working inside of a loop > that is thread-safe inside of my ray-tracer. When I set libmap to use libc_r > instead of libpthread everything just works. Using libpthread with just 1 thread > also works just fine. > >How-To-Repeat: > Cannoy paste my example code, not open source, try making a simple > multithreaded program using libpthread. You're going to need to provide more information than that. We have many multithreaded programs using libpthread, so the How-To-Repeat isn't very helpful. There were also bugs in 5.3-release that have been fixed since, so you can also try updating to -stable or -current. Also, if you are using nvidia provided drivers, they are not thread-safe with libpthread. -- DE From owner-freebsd-threads@FreeBSD.ORG Fri Jan 21 07:46:57 2005 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 5743616A4CE for ; Fri, 21 Jan 2005 07:46:57 +0000 (GMT) Received: from creme-brulee.marcuscom.com (creme-brulee.marcuscom.com [24.172.16.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5B2C43D53 for ; Fri, 21 Jan 2005 07:46:56 +0000 (GMT) (envelope-from marcus@FreeBSD.org) Received: from shumai.marcuscom.com (shumai.marcuscom.com [192.168.1.4]) j0L7l2JE043550 for ; Fri, 21 Jan 2005 02:47:02 -0500 (EST) (envelope-from marcus@FreeBSD.org) From: Joe Marcus Clarke To: threads@FreeBSD.org Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-1U1q414SiXPHFJkb9jxF" Organization: FreeBSD, Inc. Date: Fri, 21 Jan 2005 02:46:46 -0500 Message-Id: <1106293606.11662.20.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.3 FreeBSD GNOME Team Port Subject: [PATCH] Dynamic thread stack size 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: Fri, 21 Jan 2005 07:46:57 -0000 --=-1U1q414SiXPHFJkb9jxF Content-Type: text/plain Content-Transfer-Encoding: quoted-printable In a follow-up to the previous discussion on increasing our default thread stacksize, I thought I'd look at how some other BSD implementations do it. Mezz mentioned that he thought NetBSD had a 2 MB default stacksize, so I took a look. What I found was that NetBSD doesn't have a static default stacksize. Instead, they use the stacksize rlimit and a PTHREAD_STACKSIZE environment variable to get both the initial stacksize as well as each thread's default stacksize. I thought this would be a really good way of doing things, so I ported their work to FreeBSD. Here is a patch against 5-STABLE's libpthread (also applies to HEAD) that adds a dynamic thread stacksize. This can be disabled at compile time by uncommenting the -DTHR_FIXEDSTACKSIZE CFLAG in the Makefile. Initial testing shows this does the trick with applications such as gstreamer and Evolution that require a larger initial thread stacksize and per-thread default stacksize respectively. What do you think? http://www.marcuscom.com/downloads/libpthread.diff Joe --=20 Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-1U1q414SiXPHFJkb9jxF Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (FreeBSD) iD8DBQBB8LNmb2iPiv4Uz4cRApkUAJsEw93zcpMdU9Jud0B0TypCjdWB+QCfQvZD FEj/u6GC+UibcQz8Q9wQdIQ= =il8/ -----END PGP SIGNATURE----- --=-1U1q414SiXPHFJkb9jxF-- From owner-freebsd-threads@FreeBSD.ORG Sat Jan 22 18:03:18 2005 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 B816416A4CE; Sat, 22 Jan 2005 18:03:18 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5EF3643D46; Sat, 22 Jan 2005 18:03:18 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j0MI3GNA018844; Sat, 22 Jan 2005 13:03:16 -0500 (EST) Date: Sat, 22 Jan 2005 13:03:16 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Joe Marcus Clarke In-Reply-To: <1106293606.11662.20.camel@shumai.marcuscom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: threads@freebsd.org Subject: Re: [PATCH] Dynamic thread stack size X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 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: Sat, 22 Jan 2005 18:03:18 -0000 On Fri, 21 Jan 2005, Joe Marcus Clarke wrote: > In a follow-up to the previous discussion on increasing our default > thread stacksize, I thought I'd look at how some other BSD > implementations do it. Mezz mentioned that he thought NetBSD had a 2 MB > default stacksize, so I took a look. > > What I found was that NetBSD doesn't have a static default stacksize. > Instead, they use the stacksize rlimit and a PTHREAD_STACKSIZE > environment variable to get both the initial stacksize as well as each > thread's default stacksize. I thought this would be a really good way > of doing things, so I ported their work to FreeBSD. Please no. I don't want to have to set any more environment variables or login defaults to get libpthread to work with certain ports. Even if it were added, you'd have to do it to all thread libraries in all branches in order for ports to remove stacksize related patches. I thought I had increased default stack sizes, but I see that I haven't yet. -- DE From owner-freebsd-threads@FreeBSD.ORG Sat Jan 22 18:41:39 2005 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 22C6616A4CE for ; Sat, 22 Jan 2005 18:41:39 +0000 (GMT) Received: from silver.he.iki.fi (helenius.fi [193.64.42.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id C437943D1D for ; Sat, 22 Jan 2005 18:41:37 +0000 (GMT) (envelope-from pete@he.iki.fi) Received: from [193.64.42.134] (h86.vuokselantie10.fi [193.64.42.134]) by silver.he.iki.fi (8.13.1/8.11.4) with ESMTP id j0MIfZY8009864 for ; Sat, 22 Jan 2005 20:41:36 +0200 (EET) (envelope-from pete@he.iki.fi) Message-ID: <41F29E62.1000207@he.iki.fi> Date: Sat, 22 Jan 2005 20:41:38 +0200 From: Petri Helenius User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-threads@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: new mutex and thread stuff 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: Sat, 22 Jan 2005 18:41:39 -0000 Do I assume correctly that because the new thread stuff (including the higher performance mutexes) will not be MFC'd to RELENG_5 because they break the ABI? Pete From owner-freebsd-threads@FreeBSD.ORG Sat Jan 22 21:00:02 2005 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 B080B16A4CE for ; Sat, 22 Jan 2005 21:00:02 +0000 (GMT) Received: from mail.ntplx.net (mail.ntplx.net [204.213.176.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0B3C43D1D for ; Sat, 22 Jan 2005 21:00:01 +0000 (GMT) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) j0MKxwke018213; Sat, 22 Jan 2005 15:59:58 -0500 (EST) Date: Sat, 22 Jan 2005 15:59:58 -0500 (EST) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Petri Helenius In-Reply-To: <41F29E62.1000207@he.iki.fi> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.ntplx.net) cc: freebsd-threads@freebsd.org Subject: Re: new mutex and thread stuff X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 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: Sat, 22 Jan 2005 21:00:02 -0000 On Sat, 22 Jan 2005, Petri Helenius wrote: > > Do I assume correctly that because the new thread stuff (including the > higher performance mutexes) will not be MFC'd to RELENG_5 because they > break the ABI? No, they can be MFC'd as long as we use different interfaces if the current mtx API has changed. -- DE