Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932906AbcKONyF (ORCPT ); Tue, 15 Nov 2016 08:54:05 -0500 Received: from mail.efficios.com ([167.114.142.141]:51833 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751359AbcKONyC (ORCPT ); Tue, 15 Nov 2016 08:54:02 -0500 Date: Tue, 15 Nov 2016 13:54:50 +0000 (UTC) From: Mathieu Desnoyers To: Peter Zijlstra Cc: "Paul E. McKenney" , linux-kernel , Ingo Molnar , Lai Jiangshan , dipankar , Andrew Morton , Josh Triplett , Thomas Gleixner , rostedt , David Howells , Eric Dumazet , dvhart , fweisbec , Oleg Nesterov , bobby prani , ldr709 Message-ID: <1857730044.1901.1479218090893.JavaMail.zimbra@efficios.com> In-Reply-To: <20161115075113.GN3142@twins.programming.kicks-ass.net> References: <20161114183636.GA28589@linux.vnet.ibm.com> <20161115075113.GN3142@twins.programming.kicks-ass.net> Subject: Re: [PATCH RFC tip/core/rcu] SRCU rewrite MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.141] X-Mailer: Zimbra 8.7.1_GA_1670 (ZimbraWebClient - FF45 (Linux)/8.7.1_GA_1670) Thread-Topic: SRCU rewrite Thread-Index: l08odpqnP0HdDqSl6aLCWg9zZDT/ng== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 956 Lines: 26 ----- On Nov 15, 2016, at 2:51 AM, Peter Zijlstra peterz@infradead.org wrote: > On Mon, Nov 14, 2016 at 10:36:36AM -0800, Paul E. McKenney wrote: >> SRCU uses two per-cpu counters: a nesting counter to count the number of >> active critical sections, and a sequence counter to ensure that the nesting >> counters don't change while they are being added together in >> srcu_readers_active_idx_check(). >> >> This patch instead uses per-cpu lock and unlock counters. Because the both >> counters only increase and srcu_readers_active_idx_check() reads the unlock >> counter before the lock counter, this achieves the same end without having >> to increment two different counters in srcu_read_lock(). This also saves a >> smp_mb() in srcu_readers_active_idx_check(). > > A very small improvement... I feel SRCU has much bigger issues :/ Do you have specific issues in mind ? Thanks, Mathieu -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com