From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 15/18] fs: introduce a per-cpu last_ino allocator Date: Fri, 8 Oct 2010 04:44:41 -0400 Message-ID: <20101008084441.GA17366@infradead.org> References: <1286515292-15882-1-git-send-email-david@fromorbit.com> <1286515292-15882-16-git-send-email-david@fromorbit.com> <87d3rl5c1h.fsf@basil.nowhere.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Dave Chinner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Andi Kleen Return-path: Received: from canuck.infradead.org ([134.117.69.58]:59635 "EHLO canuck.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750776Ab0JHIos (ORCPT ); Fri, 8 Oct 2010 04:44:48 -0400 Content-Disposition: inline In-Reply-To: <87d3rl5c1h.fsf@basil.nowhere.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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. Currently i_ino is assigned for every inode allocated using new_inode. It's pretty stupid as most callers simply don't need it. But Dave didn't want to make this series even more complicated than nessecary and leave sorting this out for later.