From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH 15/18] fs: introduce a per-cpu last_ino allocator Date: Fri, 8 Oct 2010 12:09:44 +0200 Message-ID: <20101008100944.GE13352@basil.fritz.box> References: <1286515292-15882-1-git-send-email-david@fromorbit.com> <1286515292-15882-16-git-send-email-david@fromorbit.com> <87d3rl5c1h.fsf@basil.nowhere.org> <20101008095824.GB19804@ZenIV.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andi Kleen , Dave Chinner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Al Viro Return-path: Received: from one.firstfloor.org ([213.235.205.2]:50087 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752267Ab0JHKJt (ORCPT ); Fri, 8 Oct 2010 06:09:49 -0400 Content-Disposition: inline In-Reply-To: <20101008095824.GB19804@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Oct 08, 2010 at 10:58:24AM +0100, Al Viro wrote: > On Fri, Oct 08, 2010 at 10:22:34AM +0200, Andi Kleen wrote: > > Dave Chinner writes: > > > > > From: Eric Dumazet > > > > > > new_inode() dirties a contended cache line to get increasing > > > inode numbers. This limits performance on workloads that cause > > > significant parallel inode allocation. > > > > > > Solve this problem by using a per_cpu variable fed by the shared > > > last_ino in batches of 1024 allocations. This reduces contention on > > > the shared last_ino, and give same spreading ino numbers than before > > > (i.e. same wraparound after 2^32 allocations). > > > > This doesn't help for Unix disk file systems, so not fully sure why you > > need it for XFS. > > > > But looks reasonable, although it would be better to simply fix > > sockets/pipes/etc. to not allocate an inode numbers. > > Can be done if you bother to add ->getattr() for those, but you'll need > to do some kind of lazy allocation of inumbers for those; fstat() _will_ > want st_ino. Why not just put 0 in st_ino for sockets/pipes/etc. ? -Andi -- ak@linux.intel.com -- Speaking for myself only.