From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752617AbcESBiO (ORCPT ); Wed, 18 May 2016 21:38:14 -0400 Received: from ipmail06.adl2.internode.on.net ([150.101.137.129]:37527 "EHLO ipmail06.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751782AbcESBiN (ORCPT ); Wed, 18 May 2016 21:38:13 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqgVAJMYPVd5LBhDLWdsb2JhbABdgzeBVIZtnmkGjB2FdoQShgsEAgKBP00BAQEBAQEHAQEBAQFBQEEMAYN1AQEEOhwREhAIAxgJJQ8FJQMHGhOILsNIAQEBBwIBJB6FP4UVh2qCLgWYK44WgXOET4hij0mCaByBXSoyhECDRgEBAQ Date: Thu, 19 May 2016 11:37:53 +1000 From: Dave Chinner To: Waiman Long Cc: Peter Zijlstra , Ingo Molnar , linux-kernel@vger.kernel.org, Davidlohr Bueso , Jason Low , Scott J Norton , Douglas Hatch Subject: Re: [PATCH v2] locking/rwsem: Add reader-owned state to the owner field Message-ID: <20160519013753.GF21200@dastard> References: <1462580424-40333-1-git-send-email-Waiman.Long@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1462580424-40333-1-git-send-email-Waiman.Long@hpe.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 06, 2016 at 08:20:24PM -0400, Waiman Long wrote: > Currently, it is not possible to determine for sure if a reader > owns a rwsem by looking at the content of the rwsem data structure. > This patch adds a new state RWSEM_READER_OWNED to the owner field > to indicate that readers currently own the lock. Oh, yes please. This will enable us to get rid of the remaining mrlock rwsem abstraction we've carried since the days of Irix in XFS. The only reason the abstraction still exists is that we track write locks for the purposes of checking for correct inode locking contexts via ASSERT(xfs_isilocked()) calls.... Cheers, Dave. -- Dave Chinner david@fromorbit.com