From owner-freebsd-threads@FreeBSD.ORG Thu Dec 4 14:43:39 2014 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C39FEA3F for ; Thu, 4 Dec 2014 14:43:39 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB9C4E10 for ; Thu, 4 Dec 2014 14:43:39 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sB4EhdaL049214 for ; Thu, 4 Dec 2014 14:43:39 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 195098] pthread lock performance degradation Date: Thu, 04 Dec 2014 14:43:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 10.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-threads@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2014 14:43:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195098 --- Comment #1 from Ed Maste --- Thank you for the self-contained test case. Unfortunately I am not able to reproduce this on any of: FreeBSD 11.0-CURRENT up to date as of Nov 21 2014 (i5-2540M laptop bare metal) FreeBSD 10.1-RC2 (i7-3770 desktop bare metal) FreeBSD 10.0-RELEASE (VM image from http://nongnu.org/pretest/ under bhyve) I see from the bug-gnulib list that this has been observed running the FreeBSD image under Linux KVM. Is that common to all reproduction cases? -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-threads@FreeBSD.ORG Thu Dec 4 16:34:24 2014 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F346DEAE for ; Thu, 4 Dec 2014 16:34:24 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAE50F1D for ; Thu, 4 Dec 2014 16:34:24 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sB4GYO9K022362 for ; Thu, 4 Dec 2014 16:34:24 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 195098] pthread lock performance degradation on single CPU VM Date: Thu, 04 Dec 2014 16:34:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 10.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-threads@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2014 16:34:25 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195098 Ed Maste changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|pthread lock performance |pthread lock performance |degradation |degradation on single CPU | |VM --- Comment #2 from Ed Maste --- Aha, I can reproduce this on a single-vCPU bhyve VM: $ time ./test-once >/dev/null 9.42 real 2.57 user 6.84 sys $ time ./test-once >/dev/null 4061.43 real 801.23 user 3256.45 sys -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-threads@FreeBSD.ORG Thu Dec 4 19:37:11 2014 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AC4212A for ; Thu, 4 Dec 2014 19:37:11 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 026279AD for ; Thu, 4 Dec 2014 19:37:11 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sB4JbA5D081280 for ; Thu, 4 Dec 2014 19:37:10 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 195098] pthread lock performance degradation on single CPU VM Date: Thu, 04 Dec 2014 19:37:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 10.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-threads@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Dec 2014 19:37:11 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195098 --- Comment #3 from Ed Maste --- It appears that in the "slow" case the repro code is spinning in the pthread_yield() at line 107 - i.e., trying to allow the contender threads run, but the main thread immediately resumes. 98 /* Wait until every thread is ready. */ 99 dbgprintf ("Main thread before synchronizing for round %d\n", repeat); 100 for (;;) 101 { 102 int ready_count = 0; 103 for (i = 0; i < THREAD_COUNT; i++) 104 ready_count += ready[i]; 105 if (ready_count == THREAD_COUNT) 106 break; 107 pthread_yield (); 108 } -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-threads@FreeBSD.ORG Fri Dec 5 14:38:28 2014 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08878EDB for ; Fri, 5 Dec 2014 14:38:28 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E396938E for ; Fri, 5 Dec 2014 14:38:27 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5EcRD8072229 for ; Fri, 5 Dec 2014 14:38:27 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 195098] pthread lock performance degradation on single CPU VM in FreeBSD 10.0 Date: Fri, 05 Dec 2014 14:38:27 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 10.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: emaste@freebsd.org X-Bugzilla-Status: Closed X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-threads@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status resolution short_desc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 14:38:28 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195098 Ed Maste changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Closed Resolution|--- |Unable to Reproduce Summary|pthread lock performance |pthread lock performance |degradation on single CPU |degradation on single CPU |VM |VM in FreeBSD 10.0 --- Comment #4 from Ed Maste --- In comment 2 I missed including in the reproduction detail that this was the 10.0-REL VM. When I mentioned this kib@ pointed out that this is fixed already in r270423, and is included in the FreeBSD 10.1 release. > Restore pre-r239157 handling of sched_yield(), when thread time slice was > aborted, allowing other threads to run. Without this change thread is just > rescheduled again, that was illustrated by provided test tool. HEAD: r270423 https://svnweb.freebsd.org/base?view=revision&revision=270423 stable/10: r271194 https://svnweb.freebsd.org/base?view=revision&revision=271194 stable/9: r271195 https://svnweb.freebsd.org/base?view=revision&revision=271195 -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-threads@FreeBSD.ORG Sat Dec 6 18:34:27 2014 Return-Path: Delivered-To: freebsd-threads@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1CF56B6A for ; Sat, 6 Dec 2014 18:34:27 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 04D7E122 for ; Sat, 6 Dec 2014 18:34:27 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id sB6IYQUh062669 for ; Sat, 6 Dec 2014 18:34:26 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-threads@FreeBSD.org Subject: [Bug 121336] lang/neko threading ok on UP, broken on SMP (FreeBSD 7) Date: Sat, 06 Dec 2014 18:34:27 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: threads X-Bugzilla-Version: 7.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: sbruno@FreeBSD.org X-Bugzilla-Status: Closed X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-threads@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cc resolution Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2014 18:34:27 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=121336 Sean Bruno changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Progress |Closed CC| |sbruno@FreeBSD.org Resolution|--- |Unable to Reproduce --- Comment #2 from Sean Bruno --- lang/neko is not longer in the freebsd ports tree. -- You are receiving this mail because: You are the assignee for the bug.