xfs
[Top] [All Lists]

Re: [PATCH v23 13/22] vfs: Cache richacl in struct inode

To: Jeff Layton <jlayton@xxxxxxxxxx>, Andreas Gruenbacher <agruenba@xxxxxxxxxx>, Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH v23 13/22] vfs: Cache richacl in struct inode
From: David Howells <dhowells@xxxxxxxxxx>
Date: Thu, 07 Jul 2016 15:14:13 +0100
Cc: dhowells@xxxxxxxxxx, Christoph Hellwig <hch@xxxxxxxxxxxxx>, "Theodore Ts'o" <tytso@xxxxxxx>, Andreas Dilger <adilger.kernel@xxxxxxxxx>, "J. Bruce Fields" <bfields@xxxxxxxxxxxx>, Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>, Anna Schumaker <anna.schumaker@xxxxxxxxxx>, Dave Chinner <david@xxxxxxxxxxxxx>, linux-ext4@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-nfs@xxxxxxxxxxxxxxx, linux-cifs@xxxxxxxxxxxxxxx, linux-api@xxxxxxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1467831425.2908.16.camel@xxxxxxxxxx>
Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903
References: <1467831425.2908.16.camel@xxxxxxxxxx> <1467294433-3222-1-git-send-email-agruenba@xxxxxxxxxx> <1467294433-3222-14-git-send-email-agruenba@xxxxxxxxxx>
Jeff Layton <jlayton@xxxxxxxxxx> wrote:

> > +   if (cmpxchg(&inode->i_acl, ACL_NOT_CACHED, sentinel) != ACL_NOT_CACHED)
> > +           /* fall through */ ;
> > +
> 
> So you do the same thing regardless of the outcome of the above? Why
> bother with the if at all here? Just do the cmpxchg and toss out the
> result.

gcc might complain if you don't check the result.

However, this does look like it's subject to a thundering herd problem.  If
30000 processes all look at the ACL at the same time on a network fs, could
that cause 30000 RPC calls to be transmitted for the same thing?

David

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