From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934131AbdEOJUM (ORCPT ); Mon, 15 May 2017 05:20:12 -0400 Received: from mx2.suse.de ([195.135.220.15]:47929 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1760097AbdEOJUI (ORCPT ); Mon, 15 May 2017 05:20:08 -0400 Date: Mon, 15 May 2017 02:19:55 -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: <20170515091955.GA27169@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> <20170420183646.GF20746@linux-80c1.suse> <20170420191000.GB6873@worktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20170420191000.GB6873@worktop> 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: >For opt spinning we need to specifically know who would be next in >order, again, doesn't matter how many, just who's next. I've sent a v3 with a more precise description of this, which I hope is to your satisfaction. Given a clear tree iteration/order defined by interval trees (indexed by lowpoint and treats duplicates as inorder traversal), it is not something I would wish to alter. Over the weekend I've been experimenting more with still taking the tree->lock, but spinning while blocking ranges is 1 and 'owner' (in this case the first overlapping node, remembered when we did the initial lookup adding to the tree, _with_ the tree->lock held) is on_cpu. This would maintain the order and prevent blocking for threads that are about (?) to receive the lock. While I have somewhat of a patch, I'm tired and have not had the chance to even test the thing, so I went ahead and sent v3 anyway to not delay further. Thanks, Davidlohr