xfs
[Top] [All Lists]

Re: [PATCH] kill mrlock_t

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [PATCH] kill mrlock_t
From: "Josef 'Jeff' Sipek" <jeffpc@xxxxxxxxxxxxxx>
Date: Fri, 21 Mar 2008 14:03:38 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20080320093940.GA28966@xxxxxx>
References: <20080320093940.GA28966@xxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.16 (2007-06-11)
On Thu, Mar 20, 2008 at 10:39:40AM +0100, Christoph Hellwig wrote:
> XFS inodes are locked via the xfs_ilock family of functions which
> internally use a rw_semaphore wrapper into an abstraction called
> mrlock_t.  The mrlock_t should be purely internal to xfs_ilock functions
> but leaks through to the callers via various lock state asserts.
> 
> This patch:
> 
>  - adds new xfs_isilocked abstraction to make the lock state asserts
>    fits into the xfs_ilock API family
>  - opencodes the mrlock wrappers in the xfs_ilock family of functions
>  - makes the state tracking debug-only and merged into a single state
>    word
>  - remove superflous flags to the xfs_ilock family of functions
> 
> This kills 8 bytes per inode for non-debug builds, which would e.g.
> be the space for ACL caching on 32bit systems.
 
Nice. I do NOT see anything obviously wrong with the patch.

Josef 'Jeff' Sipek.

-- 
"Memory is like gasoline. You use it up when you are running. Of course you
get it all back when you reboot..."; Actual explanation obtained from the
Micro$oft help desk. 


<Prev in Thread] Current Thread [Next in Thread>