From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939855AbdDTShB (ORCPT ); Thu, 20 Apr 2017 14:37:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:42167 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S938398AbdDTSg6 (ORCPT ); Thu, 20 Apr 2017 14:36:58 -0400 Date: Thu, 20 Apr 2017 11:36:46 -0700 From: Davidlohr Bueso To: Peter Zijlstra Cc: mingo@kernel.org, akpm@linux-foundation.org, jack@suse.cz, kirill.shutemov@linux.intel.com, ldufour@linux.vnet.ibm.com, mhocko@suse.com, mgorman@techsingularity.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 -tip 0/6] locking: Introduce range reader/writer lock Message-ID: <20170420183646.GF20746@linux-80c1.suse> References: <20170406084620.22700-1-dave@stgolabs.net> <20170419123735.GB5730@worktop> <20170420171326.GD20746@linux-80c1.suse> <20170420175350.44mvhizyulyzb6oc@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20170420175350.44mvhizyulyzb6oc@hirez.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 20 Apr 2017, Peter Zijlstra wrote: >On Thu, Apr 20, 2017 at 10:13:26AM -0700, Davidlohr Bueso wrote: > >> I have thought of some heuristics for avoiding sleeping under certain >> constraints, which could mitigate the spinning step we loose, but I fear it >> will never be exactly as fast as rwsems -- just consider >> we always take the tree->lock. > >But tree->lock is a spinlock, so while this gets us out of rwsem-xadd >territory for the fast paths, the whole lock-stealing and optimistic >spinning stuff is on a different scale. Oh, absolutely. I was merely pointing out the differences at a hair splitting level. >Those are about avoiding actually going to sleep and having to be woken >up (and waiting to become running) again, which is a long time. Yes, which is why I was thinking of ways to mitigate this. Ie: for blocked writers with low counts of 'blocking_ranges'. Thanks, Davidlohr