From mboxrd@z Thu Jan 1 00:00:00 1970 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-cifs.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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751427AbcGGOO2 (ORCPT ); Thu, 7 Jul 2016 10:14:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38487 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750968AbcGGOOY (ORCPT ); Thu, 7 Jul 2016 10:14:24 -0400 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 From: David Howells In-Reply-To: <1467831425.2908.16.camel@redhat.com> 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> To: Jeff Layton , Andreas Gruenbacher , Alexander Viro Cc: dhowells@redhat.com, Christoph Hellwig , "Theodore Ts'o" , Andreas Dilger , "J. Bruce Fields" , Trond Myklebust , Anna Schumaker , Dave Chinner , linux-ext4@vger.kernel.org, xfs@oss.sgi.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH v23 13/22] vfs: Cache richacl in struct inode MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1688.1467900853.1@warthog.procyon.org.uk> Date: Thu, 07 Jul 2016 15:14:13 +0100 Message-ID: <1689.1467900853@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 07 Jul 2016 14:14:19 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay2.corp.sgi.com [137.38.102.29]) by oss.sgi.com (Postfix) with ESMTP id 509097CF2 for ; Thu, 7 Jul 2016 09:14:27 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay2.corp.sgi.com (Postfix) with ESMTP id 217243040E4 for ; Thu, 7 Jul 2016 07:14:20 -0700 (PDT) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by cuda.sgi.com with ESMTP id mUmhIDRbHziK4H8X (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 07 Jul 2016 07:14:20 -0700 (PDT) From: David Howells In-Reply-To: <1467831425.2908.16.camel@redhat.com> 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> Subject: Re: [PATCH v23 13/22] vfs: Cache richacl in struct inode MIME-Version: 1.0 Content-ID: <1688.1467900853.1@warthog.procyon.org.uk> Date: Thu, 07 Jul 2016 15:14:13 +0100 Message-ID: <1689.1467900853@warthog.procyon.org.uk> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: Jeff Layton , Andreas Gruenbacher , Alexander Viro Cc: Christoph Hellwig , linux-nfs@vger.kernel.org, Theodore Ts'o , linux-cifs@vger.kernel.org, linux-api@vger.kernel.org, Trond Myklebust , linux-kernel@vger.kernel.org, xfs@oss.sgi.com, dhowells@redhat.com, Andreas Dilger , "J. Bruce Fields" , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Anna Schumaker 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 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs