From: David Howells Subject: Re: [PATCH v23 13/22] vfs: Cache richacl in struct inode Date: Thu, 07 Jul 2016 15:14:13 +0100 Message-ID: <1689.1467900853@warthog.procyon.org.uk> References: <1467831425.2908.16.camel@redhat.com> <1467294433-3222-1-git-send-email-agruenba@redhat.com> <1467294433-3222-14-git-send-email-agruenba@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, Christoph Hellwig , "Theodore Ts'o" , Andreas Dilger , "J. Bruce Fields" , Trond Myklebust , Anna Schumaker , Dave Chinner , linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, xfs-VZNHf3L845pBDgjK7y7TUQ@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jeff Layton , Andreas Gruenbacher , Alexander Viro Return-path: In-Reply-To: <1467831425.2908.16.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> Content-ID: <1688.1467900853.1-S6HVgzuS8uM4Awkfq6JHfwNdhmdF6hFW@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-ext4.vger.kernel.org Jeff Layton 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