From owner-freebsd-threads@FreeBSD.ORG Sun Oct 7 02:09:53 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63C3716A419 for ; Sun, 7 Oct 2007 02:09:53 +0000 (UTC) (envelope-from freebsd_noob@yahoo.com) Received: from n10.bullet.re3.yahoo.com (n10.bullet.re3.yahoo.com [68.142.237.123]) by mx1.freebsd.org (Postfix) with SMTP id 2549C13C447 for ; Sun, 7 Oct 2007 02:09:52 +0000 (UTC) (envelope-from freebsd_noob@yahoo.com) Received: from [68.142.230.28] by n10.bullet.re3.yahoo.com with NNFMP; 07 Oct 2007 01:57:22 -0000 Received: from [216.252.122.218] by t1.bullet.re2.yahoo.com with NNFMP; 07 Oct 2007 01:57:22 -0000 Received: from [69.147.84.109] by t3.bullet.sp1.yahoo.com with NNFMP; 07 Oct 2007 01:57:22 -0000 Received: from [127.0.0.1] by omp207.mail.sp1.yahoo.com with NNFMP; 07 Oct 2007 01:57:22 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 503446.78555.bm@omp207.mail.sp1.yahoo.com Received: (qmail 12512 invoked by uid 60001); 7 Oct 2007 01:57:22 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=vjAx9NWmzmpsyavoTkS6N2mx9VSg8oWIEw+g1yIKEdb6GZUNTEC+eTAXhZcGjNvRUd/hbYIf5dEXv1FYMhJJIkPUAQO29W1dg0SGD2Y9I/v5p4Cz9jppE7mmQLGHQnWbAL15Biyr3cvs+IOky+nLvMdN7iVkfoZWAqU1ZQ/P330=; X-YMail-OSG: HhAA9NAVM1nwpUQiiw2XnPNiLi3rHi6hzX2slxiNz_g0qobTMgnjm6VPwWwd0wiLHzAlS13JGQ.IJz6fK1rkIHcNPSmjXwFcH_V5 Received: from [69.147.84.254] by web45002.mail.sp1.yahoo.com via HTTP; Sat, 06 Oct 2007 18:57:22 PDT X-Mailer: YahooMailRC/651.50 YahooMailWebService/0.7.134 Date: Sat, 6 Oct 2007 18:57:22 -0700 (PDT) From: Akshay Kawale To: freebsd-threads@freebsd.org MIME-Version: 1.0 Message-ID: <376995.12194.qm@web45002.mail.sp1.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: KSE does not appear to work when I run FreeBSD 6.2 on VMware X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2007 02:09:53 -0000 Hi,=0A=0AI'm writing a small thread library based on KSE.=0AI've got some i= nitial code ready that performs an upcall when I create a new KSE.=0A=0AHow= ever, this code only works on a physical machine. When I run FreeBSD on VMw= are, my program does not appear to perform the upcall. I know that it's not= upcalling because I intentionally seg fault in my upcall function. (I also= put a gdb breakpoint at the upcall function, which does not hit).=0A=0AI'v= e tried this on a stock 6.2 RELEASE Kernel (Physical Machine) and on 6.2 RE= LEASE and 6.2 RELEASE-p8 (VM).=0A=0AMy /proc does not appear to be set up, = so I can't use 'truss' to figure out if the KSE Syscalls are actually being= called.=0A=0Atruss: cannot open /proc/curproc/mem: No such file or directo= ry=0Atruss: cannot open1 /proc/1044/mem: No such file or directory=0A=0AI w= rote a small threaded program using pthreads, and that appears to work ok o= n VMware.=0A=0ADoes anyone have an idea what could be wrong?=0AAny suggesti= ons to help me debug?=0A=0AThanks.=0A=0A- Akshay=0A=0A=0A=0A=0A=0A ___= ___________________________________________________________________________= ______=0AShape Yahoo! in your own image. Join our Network Research Panel t= oday! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=3D7 =0A= =0A From owner-freebsd-threads@FreeBSD.ORG Sun Oct 7 02:43:22 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 931EB16A417 for ; Sun, 7 Oct 2007 02:43:22 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.176]) by mx1.freebsd.org (Postfix) with ESMTP id 5D7D113C448 for ; Sun, 7 Oct 2007 02:43:21 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so1181175waf for ; Sat, 06 Oct 2007 19:43:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=JPq/sPxHacPcVTCxNSswN1IA3+xEggFyWQdOQbqpuCE=; b=DUnb75mIc/B2I1k+0YExCexBdrDSy4Q826LnW8YskqplZi6S6aLDtsSJDgX28AARS31mwrBJsJA4pEIDGKfX2jBuOVLNJ9JFtIvO3k9hVnCr7tLts8uU0oytbUGIWHn6oGp/PHIpsdAZ61RP7oEu95CCkk1P9u0KUaWd3CxSeZM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TdI4ne0mgQMVXnB5GUMsXKp9YCxgYx9EePAm9fwDA/xoN5sbfswTS23AW/D2hG5xbUz/fQNfDWYwG86fnKkcbps1VBuuQ9RVSqwAB5JhaZs0pICtYRHot5BlnITSGkqHYjF3+RVtQEFMUxpPJum7gZjPiZwgIw3M50ZEfdUOJ9s= Received: by 10.115.111.1 with SMTP id o1mr2561437wam.1191723549966; Sat, 06 Oct 2007 19:19:09 -0700 (PDT) Received: by 10.114.13.15 with HTTP; Sat, 6 Oct 2007 19:19:09 -0700 (PDT) Message-ID: Date: Sat, 6 Oct 2007 19:19:09 -0700 From: "Kip Macy" To: "Akshay Kawale" In-Reply-To: <376995.12194.qm@web45002.mail.sp1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <376995.12194.qm@web45002.mail.sp1.yahoo.com> Cc: freebsd-threads@freebsd.org Subject: Re: KSE does not appear to work when I run FreeBSD 6.2 on VMware X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2007 02:43:22 -0000 I can't speak to your problem directly. Two (somewhat) relevant comments: - For security reasons procfs is not mounted by default. - KSE is being supplanted by libthr. -Kip On 10/6/07, Akshay Kawale wrote: > Hi, > > I'm writing a small thread library based on KSE. > I've got some initial code ready that performs an upcall when I create a new KSE. > > However, this code only works on a physical machine. When I run FreeBSD on VMware, my program does not appear to perform the upcall. I know that it's not upcalling because I intentionally seg fault in my upcall function. (I also put a gdb breakpoint at the upcall function, which does not hit). > > I've tried this on a stock 6.2 RELEASE Kernel (Physical Machine) and on 6.2 RELEASE and 6.2 RELEASE-p8 (VM). > > My /proc does not appear to be set up, so I can't use 'truss' to figure out if the KSE Syscalls are actually being called. > > truss: cannot open /proc/curproc/mem: No such file or directory > truss: cannot open1 /proc/1044/mem: No such file or directory > > I wrote a small threaded program using pthreads, and that appears to work ok on VMware. > > Does anyone have an idea what could be wrong? > Any suggestions to help me debug? > > Thanks. > > - Akshay > > > > > > ____________________________________________________________________________________ > Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 > > > _______________________________________________ > 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 Sun Oct 7 14:52:40 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3CF2A16A417 for ; Sun, 7 Oct 2007 14:52:40 +0000 (UTC) (envelope-from gofdt-freebsd-threads@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id C26D413C47E for ; Sun, 7 Oct 2007 14:52:39 +0000 (UTC) (envelope-from gofdt-freebsd-threads@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IeXUZ-0007dP-JZ for freebsd-threads@freebsd.org; Sun, 07 Oct 2007 14:52:27 +0000 Received: from 89-172-61-172.adsl.net.t-com.hr ([89.172.61.172]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Oct 2007 14:52:27 +0000 Received: from ivoras by 89-172-61-172.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Oct 2007 14:52:27 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-threads@freebsd.org From: Ivan Voras Date: Sun, 07 Oct 2007 16:52:03 +0200 Lines: 90 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 89-172-61-172.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.0 (X11/20070527) Sender: news Subject: Unexpected threading performance result X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2007 14:52:40 -0000 Hi, For an unrelated purpose, I'm benchmarking performance of tree algorithms in SMP environments and my preliminary run has an unexpected result. Here's the typical output from the (small) benchmark program, run on a dual-core Athlon64 (i386 mode): Running benchmarks on small_nonuniform, 1000000 samples Step 1: Running 100 loops ** Step 1 benchmark completed 100 loops in 84.44 seconds. Step 2: Running 2 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 2 threads in 167.46 seconds. The interpretation is: running the same loop twice, in two parallel threads doesn't result in a speedup, but it looks like the execution is serialized. The problem is: the loops are completely independent, no locking in their execution, and 'top' confirms that both threads in the program are running at 100% CPU each. I verified this behaviour on: - 7-CURRENT, i386, ULE - 7-CURRENT, i386, 4BSD - 6-STABLE, amd64, 4BSD I can't really explain this behaviour, but it might not be related to FreeBSD - maybe I made a mistake in the program or there's a hardware-related reason for it (maybe CPU cache trashing from the tree traversal?). In any case, can someone shed some light on this? The main part of the (small) program is pasted below. 47 double time_start, time_b1, time_b2; 48 int n_data, n_samples; 49 int *data, *samples; 50 51 52 void bench_loop() 53 { 54 int i; 55 struct node *nd, find; 56 for (i = 0; i < n_samples; i++) { 57 find.data = samples[i]; 58 nd = RB_FIND(node_tree, &head, &find); 59 if (nd == NULL) 60 errx(1, "Sample %d was not found", find.data); 61 } 62 } 63 64 void step1() 65 { 66 int n; 67 /* step 1 - simple tree traversal */ 68 printf("Step 1: Running %d loops\n", STEP1_ITER); 69 for (n = 0; n < STEP1_ITER; n++) 70 bench_loop(); 71 time_b1 = gettime(); 72 printf("** Step 1 benchmark completed %d loops in %0.2lf seconds.\n", STEP1_ITER, time_b1 - time_start); 73 } 74 75 void *step2_thread(void *arg) { 76 int n; 77 for (n = 0; n < STEP2_ITER; n++) 78 bench_loop(); 79 return NULL; 80 } 81 82 void step2() 83 { 84 /* step 2 - run tree traversal in parallel threads */ 85 int n; 86 pthread_t threads[STEP2_THREADS]; 87 88 printf("Step 2: Running %d threads with %d loops each\n", STEP2_THREADS, STEP2_ITER); 89 for (n = 0; n < STEP2_THREADS; n++) { 90 if (pthread_create(&threads[n], NULL, step2_thread, NULL) != 0) 91 err(1, "Cannot spawn thread"); 92 } 93 for (n = 0; n < STEP2_THREADS; n++) 94 pthread_join(threads[n], NULL); 95 time_b2 = gettime(); 96 printf("** Step 2 benchmark completed %d loops in %d threads in %0.2lf seconds.\n", 97 STEP2_ITER, STEP2_THREADS, time_b2 - time_start); 98 } From owner-freebsd-threads@FreeBSD.ORG Sun Oct 7 16:21:54 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F4C516A41A; Sun, 7 Oct 2007 16:21:54 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.freebsd.org (Postfix) with ESMTP id E379013C457; Sun, 7 Oct 2007 16:21:53 +0000 (UTC) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id AF6B61A4D83; Sun, 7 Oct 2007 09:21:53 -0700 (PDT) Date: Sun, 7 Oct 2007 09:21:53 -0700 From: Alfred Perlstein To: Ivan Voras Message-ID: <20071007162153.GX31826@elvis.mu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i Cc: freebsd-threads@freebsd.org Subject: Re: Unexpected threading performance result X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2007 16:21:54 -0000 * Ivan Voras [071007 07:52] wrote: > Hi, > > For an unrelated purpose, I'm benchmarking performance of tree > algorithms in SMP environments and my preliminary run has an unexpected > result. Here's the typical output from the (small) benchmark program, > run on a dual-core Athlon64 (i386 mode): > > Running benchmarks on small_nonuniform, 1000000 samples > Step 1: Running 100 loops > ** Step 1 benchmark completed 100 loops in 84.44 seconds. > Step 2: Running 2 threads with 100 loops each > ** Step 2 benchmark completed 100 loops in 2 threads in 167.46 seconds. > > The interpretation is: running the same loop twice, in two parallel > threads doesn't result in a speedup, but it looks like the execution is > serialized. The problem is: the loops are completely independent, no > locking in their execution, and 'top' confirms that both threads in the > program are running at 100% CPU each. ... 1) Could you please make this example program compile/work, it's a bit difficult to diagnose the problem if we don't know if things like n_samples are initialised properly. 2) Please try to pthread_attr_setscope() to PTHREAD_SCOPE_SYSTEM on a pthread_attr_t object to pass into pthread_create(). That may help. 3) What's the deal with RB_FIND? What does that do? Is that data structure locked with a an exclusive lock? > > I verified this behaviour on: > > - 7-CURRENT, i386, ULE > - 7-CURRENT, i386, 4BSD > - 6-STABLE, amd64, 4BSD > > I can't really explain this behaviour, but it might not be related to > FreeBSD - maybe I made a mistake in the program or there's a > hardware-related reason for it (maybe CPU cache trashing from the tree > traversal?). In any case, can someone shed some light on this? > > The main part of the (small) program is pasted below. > > > 47 double time_start, time_b1, time_b2; > 48 int n_data, n_samples; > 49 int *data, *samples; > 50 > 51 > 52 void bench_loop() > 53 { > 54 int i; > 55 struct node *nd, find; > 56 for (i = 0; i < n_samples; i++) { > 57 find.data = samples[i]; > 58 nd = RB_FIND(node_tree, &head, &find); > 59 if (nd == NULL) > 60 errx(1, "Sample %d was not found", find.data); > 61 } > 62 } > 63 > 64 void step1() > 65 { > 66 int n; > 67 /* step 1 - simple tree traversal */ > 68 printf("Step 1: Running %d loops\n", STEP1_ITER); > 69 for (n = 0; n < STEP1_ITER; n++) > 70 bench_loop(); > 71 time_b1 = gettime(); > 72 printf("** Step 1 benchmark completed %d loops in %0.2lf > seconds.\n", STEP1_ITER, time_b1 - time_start); > 73 } > 74 > 75 void *step2_thread(void *arg) { > 76 int n; > 77 for (n = 0; n < STEP2_ITER; n++) > 78 bench_loop(); > 79 return NULL; > 80 } > 81 > 82 void step2() > 83 { > 84 /* step 2 - run tree traversal in parallel threads */ > 85 int n; > 86 pthread_t threads[STEP2_THREADS]; > 87 > 88 printf("Step 2: Running %d threads with %d loops each\n", > STEP2_THREADS, STEP2_ITER); > 89 for (n = 0; n < STEP2_THREADS; n++) { > 90 if (pthread_create(&threads[n], NULL, step2_thread, > NULL) != 0) > 91 err(1, "Cannot spawn thread"); > 92 } > 93 for (n = 0; n < STEP2_THREADS; n++) > 94 pthread_join(threads[n], NULL); > 95 time_b2 = gettime(); > 96 printf("** Step 2 benchmark completed %d loops in %d > threads in %0.2lf seconds.\n", > 97 STEP2_ITER, STEP2_THREADS, time_b2 - > time_start); > 98 } > > _______________________________________________ > 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" -- - Alfred Perlstein From owner-freebsd-threads@FreeBSD.ORG Sun Oct 7 16:38:13 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C687016A418; Sun, 7 Oct 2007 16:38:13 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from rusty.kulnet.kuleuven.ac.be (rusty.kulnet.kuleuven.ac.be [134.58.240.42]) by mx1.freebsd.org (Postfix) with ESMTP id 832C313C459; Sun, 7 Oct 2007 16:38:13 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from localhost (localhost [127.0.0.1]) by rusty.kulnet.kuleuven.ac.be (Postfix) with ESMTP id 075341D7BFA; Sun, 7 Oct 2007 18:05:42 +0200 (CEST) Received: from smtps01.kuleuven.be (smtpshost01.kulnet.kuleuven.be [134.58.240.74]) by rusty.kulnet.kuleuven.ac.be (Postfix) with ESMTP id D43B71D7BBA; Sun, 7 Oct 2007 18:05:40 +0200 (CEST) Received: from kalimero.kotnet.org (kalimero.kotnet.org [10.4.16.222]) by smtps01.kuleuven.be (Postfix) with ESMTP id 95F9B31E702; Sun, 7 Oct 2007 18:05:40 +0200 (CEST) Received: from kalimero.kotnet.org (kalimero.kotnet.org [127.0.0.1]) by kalimero.kotnet.org (8.14.1/8.14.1) with ESMTP id l97G5esn005175; Sun, 7 Oct 2007 18:05:40 +0200 (CEST) (envelope-from tijl@ulyssis.org) X-Kuleuven: This mail passed the K.U.Leuven mailcluster From: Tijl Coosemans To: Ivan Voras Date: Sun, 7 Oct 2007 18:05:38 +0200 User-Agent: KMail/1.9.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200710071805.39399.tijl@ulyssis.org> X-Virus-Scanned: by KULeuven Antivirus Cluster Cc: freebsd-threads@freebsd.org Subject: Re: Unexpected threading performance result X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2007 16:38:13 -0000 On Sunday 07 October 2007 16:52:03 Ivan Voras wrote: > For an unrelated purpose, I'm benchmarking performance of tree > algorithms in SMP environments and my preliminary run has an unexpected > result. Here's the typical output from the (small) benchmark program, > run on a dual-core Athlon64 (i386 mode): > > Running benchmarks on small_nonuniform, 1000000 samples > Step 1: Running 100 loops > ** Step 1 benchmark completed 100 loops in 84.44 seconds. > Step 2: Running 2 threads with 100 loops each > ** Step 2 benchmark completed 100 loops in 2 threads in 167.46 seconds. My guess is, that in the beginning of step1() and step2() you have to add a line "time_start = gettime();". From owner-freebsd-threads@FreeBSD.ORG Sun Oct 7 20:09:51 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F279716A418 for ; Sun, 7 Oct 2007 20:09:50 +0000 (UTC) (envelope-from gofdt-freebsd-threads@m.gmane.org) Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 659F813C4A7 for ; Sun, 7 Oct 2007 20:09:49 +0000 (UTC) (envelope-from gofdt-freebsd-threads@m.gmane.org) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1IecRa-0006sD-Du for freebsd-threads@freebsd.org; Sun, 07 Oct 2007 20:09:42 +0000 Received: from 78-1-114-229.adsl.net.t-com.hr ([78.1.114.229]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Oct 2007 20:09:42 +0000 Received: from ivoras by 78-1-114-229.adsl.net.t-com.hr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 07 Oct 2007 20:09:42 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: freebsd-threads@freebsd.org From: Ivan Voras Date: Sun, 07 Oct 2007 22:09:28 +0200 Lines: 99 Message-ID: References: <200710071805.39399.tijl@ulyssis.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 78-1-114-229.adsl.net.t-com.hr User-Agent: Thunderbird 2.0.0.0 (X11/20070527) In-Reply-To: <200710071805.39399.tijl@ulyssis.org> Sender: news Subject: Re: Unexpected threading performance result X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Oct 2007 20:09:51 -0000 Tijl Coosemans wrote: > On Sunday 07 October 2007 16:52:03 Ivan Voras wrote: >> For an unrelated purpose, I'm benchmarking performance of tree >> algorithms in SMP environments and my preliminary run has an unexpected >> result. Here's the typical output from the (small) benchmark program, >> run on a dual-core Athlon64 (i386 mode): >> >> Running benchmarks on small_nonuniform, 1000000 samples >> Step 1: Running 100 loops >> ** Step 1 benchmark completed 100 loops in 84.44 seconds. >> Step 2: Running 2 threads with 100 loops each >> ** Step 2 benchmark completed 100 loops in 2 threads in 167.46 seconds. > > My guess is, that in the beginning of step1() and step2() you have to > add a line "time_start = gettime();". Of course I have. I was so focused on the low level stuff I did something stupid to the effect of your suggestion. Thanks for the help! The results make sense now, and if anyone's interested, I'm pasting them below. I did additional effort and run it under both 4BSD and ULE schedulers non 7-CURRENT (SMP, dual-core). -- 4BSD, nonuniform samples -- Running benchmarks on small_nonuniform, 1000000 samples Step 1: Running 100 loops ** Step 1 benchmark completed 100 loops in 86.33 seconds. Step 2: Running 2 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 2 threads in 82.79 seconds. Step 2: Running 3 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 3 threads in 124.67 seconds. Step 2: Running 4 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 4 threads in 166.32 seconds. Step 2: Running 5 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 5 threads in 210.67 seconds. Step 2: Running 6 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 6 threads in 251.83 seconds. Step 2: Running 7 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 7 threads in 291.25 seconds. -- ULE nonuniform samples -- Running benchmarks on small_nonuniform, 1000000 samples Step 1: Running 100 loops ** Step 1 benchmark completed 100 loops in 84.09 seconds. Step 2: Running 2 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 2 threads in 83.43 seconds. Step 2: Running 3 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 3 threads in 126.21 seconds. Step 2: Running 4 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 4 threads in 166.66 seconds. Step 2: Running 5 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 5 threads in 209.40 seconds. Step 2: Running 6 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 6 threads in 250.36 seconds. Step 2: Running 7 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 7 threads in 291.92 seconds. Step 2: Running 8 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 8 threads in 333.42 seconds. -- 4BSD uniform samples -- Running benchmarks on small_uniform, 1000000 samples Step 1: Running 100 loops ** Step 1 benchmark completed 100 loops in 93.33 seconds. Step 2: Running 2 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 2 threads in 89.33 seconds. Step 2: Running 3 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 3 threads in 135.20 seconds. Step 2: Running 4 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 4 threads in 179.96 seconds. Step 2: Running 5 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 5 threads in 226.40 seconds. Step 2: Running 6 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 6 threads in 269.57 seconds. Step 2: Running 7 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 7 threads in 314.06 seconds. Step 2: Running 8 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 8 threads in 358.67 seconds. -- ULE uniform samples -- Running benchmarks on small_uniform, 1000000 samples Step 1: Running 100 loops ** Step 1 benchmark completed 100 loops in 89.76 seconds. Step 2: Running 2 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 2 threads in 89.90 seconds. Step 2: Running 3 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 3 threads in 135.75 seconds. Step 2: Running 4 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 4 threads in 179.72 seconds. Step 2: Running 5 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 5 threads in 226.10 seconds. Step 2: Running 6 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 6 threads in 269.63 seconds. Step 2: Running 7 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 7 threads in 314.76 seconds. Step 2: Running 8 threads with 100 loops each ** Step 2 benchmark completed 100 loops in 8 threads in 359.44 seconds. "uniform" / "nonuniform" describes the distribution of the random number function. From owner-freebsd-threads@FreeBSD.ORG Mon Oct 8 06:47:35 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E56D216A417 for ; Mon, 8 Oct 2007 06:47:35 +0000 (UTC) (envelope-from girish_hilage@persistent.co.in) Received: from bmapps.persistent.co.in (outgoing.persistent.co.in [202.54.11.87]) by mx1.freebsd.org (Postfix) with ESMTP id 33D5213C458 for ; Mon, 8 Oct 2007 06:47:35 +0000 (UTC) (envelope-from girish_hilage@persistent.co.in) Received: from bmapps.persistent.co.in (unknown [127.0.0.1]) by bmapps.persistent.co.in (Symantec Mail Security) with ESMTP id 86F3A5282BE for ; Mon, 8 Oct 2007 11:57:09 +0530 (IST) X-AuditID: 0a4e0006-9bdbbbb000005379-55-4709cdbde1e7 Received: from mail.persistent.co.in (unknown [10.78.0.1]) by bmapps.persistent.co.in (Symantec Mail Security) with ESMTP id 7C0134E4002 for ; Mon, 8 Oct 2007 11:57:09 +0530 (IST) Received: from ps2408.persistent.co.in ([10.77.196.113]) by mail.persistent.co.in (MOS 3.8.5-GA) with ESMTP id BMV50468 (AUTH girish_hilage); Mon, 8 Oct 2007 11:57:09 +0530 (IST) From: Girish Hilage To: freebsd-threads@freebsd.org Date: Mon, 08 Oct 2007 11:57:28 +0530 Message-Id: <1191824849.2054.5.camel@ps2408.persistent.co.in> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 (2.6.0-1) X-Junkmail-Whitelist: YES (by domain whitelist at mail6.persistent.co.in) X-Brightmail-Tracker: AAAAAA== Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Co-opting signals X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2007 06:47:36 -0000 Hi, I heard that, user level pthreads co-opt some signals to get their job done. Can anybody please let me know which are these signals? Regards, Girish DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails. From owner-freebsd-threads@FreeBSD.ORG Mon Oct 8 11:08:43 2007 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 791C216A4E2 for ; Mon, 8 Oct 2007 11:08:43 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 5AE4113C46A for ; Mon, 8 Oct 2007 11:08:43 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l98B8hXZ083478 for ; Mon, 8 Oct 2007 11:08:43 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l98B8g28083474 for freebsd-threads@FreeBSD.org; Mon, 8 Oct 2007 11:08:42 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 8 Oct 2007 11:08:42 GMT Message-Id: <200710081108.l98B8g28083474@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-threads@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2007 11:08:43 -0000 Current FreeBSD problem reports Critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- s threa/76690 threads fork hang in child for -lc_r 1 problem total. Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/20016 threads pthreads: Cannot set scheduling timer/Cannot set virtu s threa/24472 threads libc_r does not honor SO_SNDTIMEO/SO_RCVTIMEO socket o s threa/24632 threads libc_r delicate deviation from libc in handling SIGCHL s bin/32295 threads pthread dont dequeue signals s threa/34536 threads accept() blocks other threads o kern/38549 threads the procces compiled whith pthread stopped in pthread_ s threa/39922 threads [threads] [patch] Threaded applications executed with s threa/48856 threads Setting SIGCHLD to SIG_IGN still leaves zombies under s threa/49087 threads Signals lost in programs linked with libc_r s kern/64313 threads FreeBSD (OpenBSD) pthread implicit set/unset O_NONBLOC o threa/70975 threads unexpected and unreliable behaviour when using SYSV se o threa/72429 threads threads blocked in stdio (fgets, etc) are not cancella o threa/72953 threads fork() unblocks blocked signals w/o PTHREAD_SCOPE_SYST o threa/75273 threads FBSD 5.3 libpthread (KSE) bug o threa/75374 threads pthread_kill() ignores SA_SIGINFO flag s threa/76694 threads fork cause hang in dup()/close() function in child (-l o threa/79683 threads svctcp_create() fails if multiple threads call at the o threa/80435 threads panic on high loads o threa/83914 threads [libc] popen() doesn't work in static threaded program s threa/84483 threads problems with devel/nspr and -lc_r on 4.x o threa/85160 threads [libthr] [patch] libobjc + libpthread/libthr crash pro o kern/91266 threads [threads] Trying sleep, but thread marked as sleeping s threa/94467 threads send(), sendto() and sendmsg() are not correct in libc s threa/100815 threads FBSD 5.5 broke nanosleep in libc_r o threa/101323 threads fork(2) in threaded programs broken. o threa/103975 threads Implicit loading/unloading of libpthread.so may crash o threa/110636 threads gdb(1): using gdb with multi thread application with l o threa/113666 threads misc/shared-mime-info doesn't install, can't find thre 28 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- s kern/19247 threads uthread_sigaction.c does not do anything wrt SA_NOCLDW s kern/22190 threads A threaded read(2) from a socketpair(2) fd can sometim s threa/30464 threads pthread mutex attributes -- pshared s threa/37676 threads libc_r: msgsnd(), msgrcv(), pread(), pwrite() need wra s threa/40671 threads pthread_cancel doesn't remove thread from condition qu s threa/69020 threads pthreads library leaks _gc_mutex o threa/79887 threads [patch] freopen() isn't thread-safe o threa/80992 threads abort() sometimes not caught by gdb depending on threa o threa/110306 threads apache 2.0 segmentation violation when calling gethost o threa/115211 threads pthread_atfork misbehaves in initial thread o threa/116668 threads can no longer use jdk15 with libthr on -stable SMP 11 problems total. From owner-freebsd-threads@FreeBSD.ORG Mon Oct 8 18:17:20 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D77616A420 for ; Mon, 8 Oct 2007 18:17:20 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outC.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id 3C95E13C4AA for ; Mon, 8 Oct 2007 18:17:20 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Mon, 08 Oct 2007 11:17:19 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id 27E4B126606; Mon, 8 Oct 2007 11:17:19 -0700 (PDT) Message-ID: <470A7437.30708@elischer.org> Date: Mon, 08 Oct 2007 11:17:27 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Kip Macy References: <376995.12194.qm@web45002.mail.sp1.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-threads@freebsd.org Subject: Re: KSE does not appear to work when I run FreeBSD 6.2 on VMware X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2007 18:17:20 -0000 Kip Macy wrote: > I can't speak to your problem directly. > > Two (somewhat) relevant comments: > > - For security reasons procfs is not mounted by default. > - KSE is being supplanted by libthr. He's not using libkse but writing his own concurrancy app by using the primatives. My question is whether he is on amd64 or i386 > > -Kip > > > On 10/6/07, Akshay Kawale wrote: >> Hi, >> >> I'm writing a small thread library based on KSE. >> I've got some initial code ready that performs an upcall when I create a new KSE. >> >> However, this code only works on a physical machine. When I run FreeBSD on VMware, my program does not appear to perform the upcall. I know that it's not upcalling because I intentionally seg fault in my upcall function. (I also put a gdb breakpoint at the upcall function, which does not hit). >> >> I've tried this on a stock 6.2 RELEASE Kernel (Physical Machine) and on 6.2 RELEASE and 6.2 RELEASE-p8 (VM). >> >> My /proc does not appear to be set up, so I can't use 'truss' to figure out if the KSE Syscalls are actually being called. >> >> truss: cannot open /proc/curproc/mem: No such file or directory >> truss: cannot open1 /proc/1044/mem: No such file or directory >> >> I wrote a small threaded program using pthreads, and that appears to work ok on VMware. >> >> Does anyone have an idea what could be wrong? >> Any suggestions to help me debug? >> >> Thanks. >> >> - Akshay >> >> >> >> >> >> ____________________________________________________________________________________ >> Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 >> >> >> _______________________________________________ >> 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" >> > _______________________________________________ > 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 Mon Oct 8 19:01:47 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73A1A16A41A for ; Mon, 8 Oct 2007 19:01:47 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from mail.netplex.net (mail.netplex.net [204.213.176.10]) by mx1.freebsd.org (Postfix) with ESMTP id 3884F13C481 for ; Mon, 8 Oct 2007 19:01:47 +0000 (UTC) (envelope-from deischen@freebsd.org) Received: from sea.ntplx.net (sea.ntplx.net [204.213.176.11]) by mail.netplex.net (8.14.1/8.14.1/NETPLEX) with ESMTP id l98J1itb006554; Mon, 8 Oct 2007 15:01:45 -0400 (EDT) X-Virus-Scanned: by AMaViS and Clam AntiVirus (mail.netplex.net) X-Greylist: Message whitelisted by DRAC access database, not delayed by milter-greylist-3.0 (mail.netplex.net [204.213.176.10]); Mon, 08 Oct 2007 15:01:45 -0400 (EDT) Date: Mon, 8 Oct 2007 15:01:44 -0400 (EDT) From: Daniel Eischen X-X-Sender: eischen@sea.ntplx.net To: Girish Hilage In-Reply-To: <1191824849.2054.5.camel@ps2408.persistent.co.in> Message-ID: References: <1191824849.2054.5.camel@ps2408.persistent.co.in> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-threads@freebsd.org Subject: Re: Co-opting signals 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: Mon, 08 Oct 2007 19:01:47 -0000 On Mon, 8 Oct 2007, Girish Hilage wrote: > Hi, > > I heard that, user level pthreads co-opt some signals to get their > job done. > Can anybody please let me know which are these signals? Not true since 4.x since only libc_r did this. Since FreeBSD 5.x, the default thread libraries (libpthread/libkse, and libthr) do not use signals for their implementation. Under 5.x and subsequent, just compile and link your program normally (use -pthread or -lpthread when linking) and you will get the default thread library (not libc_r, which has been deprecated in 7.x/current). -- DE From owner-freebsd-threads@FreeBSD.ORG Tue Oct 9 06:34:11 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C7DD16A418 for ; Tue, 9 Oct 2007 06:34:11 +0000 (UTC) (envelope-from girish_hilage@persistent.co.in) Received: from bmapps.persistent.co.in (outgoing.persistent.co.in [202.54.11.87]) by mx1.freebsd.org (Postfix) with ESMTP id 6A32413C45D for ; Tue, 9 Oct 2007 06:34:10 +0000 (UTC) (envelope-from girish_hilage@persistent.co.in) Received: from bmapps.persistent.co.in (unknown [127.0.0.1]) by bmapps.persistent.co.in (Symantec Mail Security) with ESMTP id 930D7529E51; Tue, 9 Oct 2007 12:04:08 +0530 (IST) X-AuditID: 0a4e0006-a4bd5bb0000061f3-ea-470b20e0f004 Received: from mail.persistent.co.in (unknown [10.78.0.1]) by bmapps.persistent.co.in (Symantec Mail Security) with ESMTP id 7BD134E4002; Tue, 9 Oct 2007 12:04:08 +0530 (IST) Received: from ps2408.persistent.co.in ([10.77.196.113]) by mail.persistent.co.in (MOS 3.8.5-GA) with ESMTP id BMW34959 (AUTH girish_hilage); Tue, 9 Oct 2007 12:04:08 +0530 (IST) From: Girish Hilage To: Daniel Eischen In-Reply-To: References: <1191824849.2054.5.camel@ps2408.persistent.co.in> Date: Tue, 09 Oct 2007 12:04:31 +0530 Message-Id: <1191911671.2054.32.camel@ps2408.persistent.co.in> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 (2.6.0-1) X-Junkmail-Whitelist: YES (by domain whitelist at mail6.persistent.co.in) X-Brightmail-Tracker: AAAAAA== Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-threads@freebsd.org Subject: Re: Co-opting signals X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2007 06:34:11 -0000 Thanks Daniel for your response. But I want to know if libc_r is still(in it's latest version) co-opting signals internally? Regards, Girish On Mon, 2007-10-08 at 15:01 -0400, Daniel Eischen wrote: > On Mon, 8 Oct 2007, Girish Hilage wrote: > > > Hi, > > > > I heard that, user level pthreads co-opt some signals to get their > > job done. > > Can anybody please let me know which are these signals? > > Not true since 4.x since only libc_r did this. Since FreeBSD 5.x, > the default thread libraries (libpthread/libkse, and libthr) do > not use signals for their implementation. Under 5.x and subsequent, > just compile and link your program normally (use -pthread or > -lpthread when linking) and you will get the default thread > library (not libc_r, which has been deprecated in 7.x/current). > From owner-freebsd-threads@FreeBSD.ORG Tue Oct 9 06:36:30 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBCB116A41B for ; Tue, 9 Oct 2007 06:36:30 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.181]) by mx1.freebsd.org (Postfix) with ESMTP id 8FE3E13C467 for ; Tue, 9 Oct 2007 06:36:30 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so1983747waf for ; Mon, 08 Oct 2007 23:36:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=3HNUMxcBFQQiJf5B2JQ2FDYwB0Pr9yCGgckLIwSxcn4=; b=Y/z6fhhxP8E+LuHfsFz+yIYQUCq46HxkDzme+J+OJUKoePRvHfg8zdwaTXEcJI68XBY7KhzS85dqDBU0lhqenpv18yEXTia4Upg/yF/6y2HFTFdhctRLLZj2EuGgC+y6fZuKxtGyITt638sdy9P8SxMDpsbVhGEbGVh+Dk/bSGU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HyBkFVLmt6YRRlmSEDm49lSTNVw1XgbdU73GNjPsOmCQWSo0NeZQC/+jh90H+kGwKjWULptA2xnj+8jxeSwmKJOduf+oxYXtz2XB+Ii4HsRp+QpN099NFL+PKFBFxJ6GAyAy1EVslFC+yL/MTq7o6Z+mXXPm7+7OGY0RIOt6q/c= Received: by 10.114.130.1 with SMTP id c1mr7282127wad.1191911789898; Mon, 08 Oct 2007 23:36:29 -0700 (PDT) Received: by 10.114.13.15 with HTTP; Mon, 8 Oct 2007 23:36:29 -0700 (PDT) Message-ID: Date: Mon, 8 Oct 2007 23:36:29 -0700 From: "Kip Macy" To: "Girish Hilage" In-Reply-To: <1191911671.2054.32.camel@ps2408.persistent.co.in> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1191824849.2054.5.camel@ps2408.persistent.co.in> <1191911671.2054.32.camel@ps2408.persistent.co.in> Cc: Daniel Eischen , freebsd-threads@freebsd.org Subject: Re: Co-opting signals X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2007 06:36:30 -0000 libc_r has been disconnected from the build for some time. On 10/8/07, Girish Hilage wrote: > Thanks Daniel for your response. > But I want to know if libc_r is still(in it's latest version) co-opting > signals internally? > > Regards, > Girish > > On Mon, 2007-10-08 at 15:01 -0400, Daniel Eischen wrote: > > > On Mon, 8 Oct 2007, Girish Hilage wrote: > > > > > Hi, > > > > > > I heard that, user level pthreads co-opt some signals to get their > > > job done. > > > Can anybody please let me know which are these signals? > > > > Not true since 4.x since only libc_r did this. Since FreeBSD 5.x, > > the default thread libraries (libpthread/libkse, and libthr) do > > not use signals for their implementation. Under 5.x and subsequent, > > just compile and link your program normally (use -pthread or > > -lpthread when linking) and you will get the default thread > > library (not libc_r, which has been deprecated in 7.x/current). > > > _______________________________________________ > 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 Oct 9 06:50:52 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FD6C16A418; Tue, 9 Oct 2007 06:50:52 +0000 (UTC) (envelope-from girish_hilage@persistent.co.in) Received: from bmapps.persistent.co.in (outgoing.persistent.co.in [202.54.11.87]) by mx1.freebsd.org (Postfix) with ESMTP id 7993C13C43E; Tue, 9 Oct 2007 06:50:51 +0000 (UTC) (envelope-from girish_hilage@persistent.co.in) Received: from bmapps.persistent.co.in (unknown [127.0.0.1]) by bmapps.persistent.co.in (Symantec Mail Security) with ESMTP id 2E32E528F79; Tue, 9 Oct 2007 12:20:50 +0530 (IST) X-AuditID: 0a4e0006-a5bd7bb0000061f3-4c-470b24ca82e4 Received: from mail.persistent.co.in (unknown [10.78.0.1]) by bmapps.persistent.co.in (Symantec Mail Security) with ESMTP id 014E04E4002; Tue, 9 Oct 2007 12:20:50 +0530 (IST) Received: from ps2408.persistent.co.in ([10.77.196.113]) by mail.persistent.co.in (MOS 3.8.5-GA) with ESMTP id BMW36663 (AUTH girish_hilage); Tue, 9 Oct 2007 12:20:49 +0530 (IST) From: Girish Hilage To: Kip Macy In-Reply-To: References: <1191824849.2054.5.camel@ps2408.persistent.co.in> <1191911671.2054.32.camel@ps2408.persistent.co.in> Date: Tue, 09 Oct 2007 12:21:12 +0530 Message-Id: <1191912673.2054.41.camel@ps2408.persistent.co.in> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 (2.6.0-1) X-Junkmail-Whitelist: YES (by domain whitelist at mail6.persistent.co.in) X-Brightmail-Tracker: AAAAAA== Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Daniel Eischen , freebsd-threads@freebsd.org Subject: Re: Co-opting signals X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2007 06:50:52 -0000 Thanks Kip. My application is using pthread_kill() to send SIGUSR1 to child threads. I am using 4.x and I want to make sure if SIGUSR1 is not being co-opted. Or for a complete information what all signals are being co-opted and how should I find out from libc_r source that it's not being co-opted? I grep'ed for SIGUSR1 in libc_r source code and did not find it being used anywhere so I came to the conclusion that it's not being co-opted. Is greping through the source code enough to determine that the signal is not being used? On Mon, 2007-10-08 at 23:36 -0700, Kip Macy wrote: > libc_r has been disconnected from the build for some time. > > On 10/8/07, Girish Hilage wrote: > > Thanks Daniel for your response. > > But I want to know if libc_r is still(in it's latest version) co-opting > > signals internally? > > > > Regards, > > Girish > > > > On Mon, 2007-10-08 at 15:01 -0400, Daniel Eischen wrote: > > > > > On Mon, 8 Oct 2007, Girish Hilage wrote: > > > > > > > Hi, > > > > > > > > I heard that, user level pthreads co-opt some signals to get their > > > > job done. > > > > Can anybody please let me know which are these signals? > > > > > > Not true since 4.x since only libc_r did this. Since FreeBSD 5.x, > > > the default thread libraries (libpthread/libkse, and libthr) do > > > not use signals for their implementation. Under 5.x and subsequent, > > > just compile and link your program normally (use -pthread or > > > -lpthread when linking) and you will get the default thread > > > library (not libc_r, which has been deprecated in 7.x/current). > > > > > _______________________________________________ > > 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 Oct 9 07:05:41 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A2A116A468 for ; Tue, 9 Oct 2007 07:05:41 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: from wa-out-1112.google.com (wa-out-1112.google.com [209.85.146.180]) by mx1.freebsd.org (Postfix) with ESMTP id 204E913C49D for ; Tue, 9 Oct 2007 07:05:41 +0000 (UTC) (envelope-from kip.macy@gmail.com) Received: by wa-out-1112.google.com with SMTP id k17so1990716waf for ; Tue, 09 Oct 2007 00:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=VM8iAMRQfyPClXtOS7fuyaKcQAp5D4EELk+Fvtb29RY=; b=PVyA5JgYxkeDoAJsXwzTktqHq19dX7RZ3LEJrR//ZDMqf9MgUZNmEbY5ML9dlA0lrlDofjBO01zeLxnhmlm6o60MCkHdObvleokdPSx1AXxgotliQLaoXCidQEyGyB6SU7++t5zJYNYaM01Y5sZIvPxoDTReY/6gWiAI02aCZ/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Pp7NuAjGalrmNxVGyCCWsxEWxA+/uGCft2Va1SW/49OaHDpO/hdKKivx4qzbH12j+LJioMGmtda2UfKnQFJxtltHanILhIYqwzuO4cY73OnzJTKpyJ0IslBuJDY1GtsoEk/Nj9uhReqJ7hYrlR71Nzeyyfqhj3Q9ixlTD8+cP/A= Received: by 10.114.169.2 with SMTP id r2mr1965104wae.1191913540298; Tue, 09 Oct 2007 00:05:40 -0700 (PDT) Received: by 10.114.13.15 with HTTP; Tue, 9 Oct 2007 00:05:40 -0700 (PDT) Message-ID: Date: Tue, 9 Oct 2007 00:05:40 -0700 From: "Kip Macy" To: "Girish Hilage" In-Reply-To: <1191912673.2054.41.camel@ps2408.persistent.co.in> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1191824849.2054.5.camel@ps2408.persistent.co.in> <1191911671.2054.32.camel@ps2408.persistent.co.in> <1191912673.2054.41.camel@ps2408.persistent.co.in> Cc: Daniel Eischen , freebsd-threads@freebsd.org Subject: Re: Co-opting signals X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2007 07:05:41 -0000 On 10/8/07, Girish Hilage wrote: > > Thanks Kip. > My application is using pthread_kill() to send SIGUSR1 to child threads. > I am using 4.x and I want to make sure if SIGUSR1 is not being co-opted. Or > for a complete information what all signals are being co-opted and how > should I find out from libc_r source that it's not being co-opted? I grep'ed > for SIGUSR1 in libc_r source code and did not find it being used anywhere so > I came to the conclusion that it's not being co-opted. Is greping through > the source code enough to determine that the signal is not being used? Linuxthreads used SIGUSR1. libc_r uses SIGVTALRM for driving preemptive context switches. > > > On Mon, 2007-10-08 at 23:36 -0700, Kip Macy wrote: > libc_r has been disconnected from the build for some time. > > On 10/8/07, Girish Hilage wrote: > > Thanks Daniel for your response. > > But I want to know if libc_r is still(in it's latest version) co-opting > > signals internally? > > > > Regards, > > Girish > > > > On Mon, 2007-10-08 at 15:01 -0400, Daniel Eischen wrote: > > > > > On Mon, 8 Oct 2007, Girish Hilage wrote: > > > > > > > Hi, > > > > > > > > I heard that, user level pthreads co-opt some signals to get their > > > > job done. > > > > Can anybody please let me know which are these signals? > > > > > > Not true since 4.x since only libc_r did this. Since FreeBSD 5.x, > > > the default thread libraries (libpthread/libkse, and libthr) do > > > not use signals for their implementation. Under 5.x and subsequent, > > > just compile and link your program normally (use -pthread or > > > -lpthread when linking) and you will get the default thread > > > library (not libc_r, which has been deprecated in 7.x/current). > > > > > _______________________________________________ > > 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" > > > > > > DISCLAIMER ========== This e-mail may contain privileged and confidential > information which is the property of Persistent Systems Ltd. It is intended > only for the use of the individual or entity to which it is addressed. If > you are not the intended recipient, you are not authorized to read, retain, > copy, print, distribute or use this message. If you have received this > communication in error, please notify the sender and delete all copies of > this message. Persistent Systems Ltd. does not accept any liability for > virus infected mails. =========== "Persistent Systems Pvt. Ltd. is now > PERSISTENT SYSTEMS LIMITED" =========== From owner-freebsd-threads@FreeBSD.ORG Tue Oct 9 09:39:24 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAA0116A417 for ; Tue, 9 Oct 2007 09:39:24 +0000 (UTC) (envelope-from freebsd_noob@yahoo.com) Received: from web45006.mail.sp1.yahoo.com (web45006.mail.sp1.yahoo.com [68.180.197.93]) by mx1.freebsd.org (Postfix) with SMTP id D3D4B13C4B2 for ; Tue, 9 Oct 2007 09:39:24 +0000 (UTC) (envelope-from freebsd_noob@yahoo.com) Received: (qmail 68647 invoked by uid 60001); 9 Oct 2007 09:12:43 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=0bjWZkmka0+q0IHOwunEa7bpZ9Gbbq6EWDGwFWmhsu+t+zQ/pPptMK7dAt8WPnJ33/+/TvPIjLVUdQxR5ennjfxUqqHvIzaQpPlUhf06z8uQ4JYy6Q1OcpQCS4xtDcuJBDYtV/p1u1cKR6b++DpkH1FBaPSyH5663Ko5zUuGUcM=; X-YMail-OSG: TxWkntoVM1mUX3dI9gsCMagc95KLuY.8FgsxXvPWnJQ76HaDZm6Ygfj1FGSo1uEq593CMALmqzK7E_SN.aU4.pyJVuSua0neeB5e Received: from [69.147.84.253] by web45006.mail.sp1.yahoo.com via HTTP; Tue, 09 Oct 2007 02:12:42 PDT X-Mailer: YahooMailRC/651.50 YahooMailWebService/0.7.134 Date: Tue, 9 Oct 2007 02:12:42 -0700 (PDT) From: Akshay Kawale To: Julian Elischer , Kip Macy MIME-Version: 1.0 Message-ID: <171691.66820.qm@web45006.mail.sp1.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-threads@freebsd.org Subject: Re: KSE does not appear to work when I run FreeBSD 6.2 on VMware X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2007 09:39:25 -0000 I have an amd64 machine, but I'm using a generic FreeBSD kernel.=0AMy host = OS is Ubuntu i386 (not amd64), so I'm not sure what is exported to the gues= t.=0A=0AMy physical machine is a P4 however.=0AWould that make a difference= ? (Considering my kernel/libc is compiled for a generic i386/i686).=0A=0A- = Akshay=0A=0A----- Original Message ----=0AFrom: Julian Elischer =0ATo: Kip Macy =0ACc: Akshay Kawale ; freebsd-threads@freebsd.org=0ASent: Monday, October 8, 20= 07 11:17:27 AM=0ASubject: Re: KSE does not appear to work when I run FreeBS= D 6.2 on VMware=0A=0AKip Macy wrote:=0A> I can't speak to your problem dire= ctly.=0A> =0A> Two (somewhat) relevant comments:=0A> =0A> - For security re= asons procfs is not mounted by default.=0A> - KSE is being supplanted by li= bthr.=0A=0A=0AHe's not using libkse but writing his own concurrancy app by = using the =0Aprimatives.=0A=0AMy question is whether he is on amd64 or i38= 6=0A=0A=0A> =0A> -Kip=0A> =0A> =0A> On 10/6/07, Akshay Kawale wrote:=0A>> Hi,=0A>>=0A>> I'm writing a small thread library ba= sed on KSE.=0A>> I've got some initial code ready that performs an upcall w= hen I create a new KSE.=0A>>=0A>> However, this code only works on a physic= al machine. When I run FreeBSD on VMware, my program does not appear to per= form the upcall. I know that it's not upcalling because I intentionally seg= fault in my upcall function. (I also put a gdb breakpoint at the upcall fu= nction, which does not hit).=0A>>=0A>> I've tried this on a stock 6.2 RELEA= SE Kernel (Physical Machine) and on 6.2 RELEASE and 6.2 RELEASE-p8 (VM).=0A= >>=0A>> My /proc does not appear to be set up, so I can't use 'truss' to fi= gure out if the KSE Syscalls are actually being called.=0A>>=0A>> truss: ca= nnot open /proc/curproc/mem: No such file or directory=0A>> truss: cannot o= pen1 /proc/1044/mem: No such file or directory=0A>>=0A>> I wrote a small th= readed program using pthreads, and that appears to work ok on VMware.=0A>>= =0A>> Does anyone have an idea what could be wrong?=0A>> Any suggestions to= help me debug?=0A>>=0A>> Thanks.=0A>>=0A>> - Akshay=0A>>=0A>>=0A>>=0A>>=0A= >>=0A>> _____________________________________________________________= _______________________=0A>> Shape Yahoo! in your own image. Join our Netw= ork Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_in= vite.asp?a=3D7=0A>>=0A>>=0A>> _____________________________________________= __=0A>> freebsd-threads@freebsd.org mailing list=0A>> http://lists.freebsd.= org/mailman/listinfo/freebsd-threads=0A>> To unsubscribe, send any mail to = "freebsd-threads-unsubscribe@freebsd.org"=0A>>=0A> ________________________= _______________________=0A> freebsd-threads@freebsd.org mailing list=0A> ht= tp://lists.freebsd.org/mailman/listinfo/freebsd-threads=0A> To unsubscribe,= send any mail to "freebsd-threads-unsubscribe@freebsd.org"=0A=0A=0A=0A=0A= =0A=0A=0A=0A _________________________________________________________= ___________________________=0AShape Yahoo! in your own image. Join our Net= work Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_i= nvite.asp?a=3D7 =0A=0A From owner-freebsd-threads@FreeBSD.ORG Tue Oct 9 16:31:42 2007 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BF8E16A419 for ; Tue, 9 Oct 2007 16:31:42 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outJ.internet-mail-service.net (outJ.internet-mail-service.net [216.240.47.233]) by mx1.freebsd.org (Postfix) with ESMTP id DE4B513C45A for ; Tue, 9 Oct 2007 16:31:41 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Tue, 09 Oct 2007 09:31:41 -0700 X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 7C6F812661D; Tue, 9 Oct 2007 09:31:40 -0700 (PDT) Message-ID: <470BACF5.40509@elischer.org> Date: Tue, 09 Oct 2007 09:31:49 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Akshay Kawale References: <171691.66820.qm@web45006.mail.sp1.yahoo.com> In-Reply-To: <171691.66820.qm@web45006.mail.sp1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-threads@freebsd.org Subject: Re: KSE does not appear to work when I run FreeBSD 6.2 on VMware X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2007 16:31:42 -0000 Akshay Kawale wrote: > I have an amd64 machine, but I'm using a generic FreeBSD kernel. > My host OS is Ubuntu i386 (not amd64), so I'm not sure what is exported > to the guest. > > My physical machine is a P4 however. > Would that make a difference? (Considering my kernel/libc is compiled > for a generic i386/i686). > is it an amd64 freebsd kernel or i386? > - Akshay > > ----- Original Message ---- > From: Julian Elischer > To: Kip Macy > Cc: Akshay Kawale ; freebsd-threads@freebsd.org > Sent: Monday, October 8, 2007 11:17:27 AM > Subject: Re: KSE does not appear to work when I run FreeBSD 6.2 on VMware > > Kip Macy wrote: > > I can't speak to your problem directly. > > > > Two (somewhat) relevant comments: > > > > - For security reasons procfs is not mounted by default. > > - KSE is being supplanted by libthr. > > > He's not using libkse but writing his own concurrancy app by using the > primatives. > > My question is whether he is on amd64 or i386 > > > > > > -Kip > > > > > > On 10/6/07, Akshay Kawale wrote: > >> Hi, > >> > >> I'm writing a small thread library based on KSE. > >> I've got some initial code ready that performs an upcall when I > create a new KSE. > >> > >> However, this code only works on a physical machine. When I run > FreeBSD on VMware, my program does not appear to perform the upcall. I > know that it's not upcalling because I intentionally seg fault in my > upcall function. (I also put a gdb breakpoint at the upcall function, > which does not hit). > >> > >> I've tried this on a stock 6.2 RELEASE Kernel (Physical Machine) and > on 6.2 RELEASE and 6.2 RELEASE-p8 (VM). > >> > >> My /proc does not appear to be set up, so I can't use 'truss' to > figure out if the KSE Syscalls are actually being called. > >> > >> truss: cannot open /proc/curproc/mem: No such file or directory > >> truss: cannot open1 /proc/1044/mem: No such file or directory > >> > >> I wrote a small threaded program using pthreads, and that appears to > work ok on VMware. > >> > >> Does anyone have an idea what could be wrong? > >> Any suggestions to help me debug? > >> > >> Thanks. > >> > >> - Akshay > >> > >> > >> > >> > >> > >> > ____________________________________________________________________________________ > >> Shape Yahoo! in your own image. Join our Network Research Panel > today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 > >> > >> > >> _______________________________________________ > >> 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" > >> > > _______________________________________________ > > 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" > > > > ------------------------------------------------------------------------ > Yahoo! oneSearch: Finally, mobile search that gives answers > , > not web links.