From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S947004AbdDTTRP (ORCPT ); Thu, 20 Apr 2017 15:17:15 -0400 Received: from merlin.infradead.org ([205.233.59.134]:58226 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S946804AbdDTTRK (ORCPT ); Thu, 20 Apr 2017 15:17:10 -0400 Date: Thu, 20 Apr 2017 21:10:00 +0200 From: Peter Zijlstra To: Davidlohr Bueso 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: <20170420191000.GB6873@worktop> References: <20170406084620.22700-1-dave@stgolabs.net> <20170419123735.GB5730@worktop> <20170420171326.GD20746@linux-80c1.suse> <20170420175350.44mvhizyulyzb6oc@hirez.programming.kicks-ass.net> <20170420183646.GF20746@linux-80c1.suse> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170420183646.GF20746@linux-80c1.suse> User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 20, 2017 at 11:36:46AM -0700, Davidlohr Bueso wrote: > On Thu, 20 Apr 2017, Peter Zijlstra wrote: > >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'. So for this it would be good to have a better understanding of that whole fairness / interval order crud. IIRC rwsem only does writer-writer stealing and opt spinning, right? And for stealing it doesn't matter how many are pending, just that you are running and they are not (and then you get fairness issues and handover etc..). For opt spinning we need to specifically know who would be next in order, again, doesn't matter how many, just who's next.