From: Al Viro Subject: Re: [PATCH 15/18] fs: introduce a per-cpu last_ino allocator Date: Fri, 8 Oct 2010 10:56:58 +0100 Message-ID: <20101008095658.GA19804@ZenIV.linux.org.uk> References: <1286515292-15882-1-git-send-email-david@fromorbit.com> <1286515292-15882-16-git-send-email-david@fromorbit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Dave Chinner Return-path: Content-Disposition: inline In-Reply-To: <1286515292-15882-16-git-send-email-david@fromorbit.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Fri, Oct 08, 2010 at 04:21:29PM +1100, Dave Chinner wrote: > 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). FWIW, that one is begging to be split; what I mean is that there are two classes of callers; ones that will set i_ino themselves anyway and ones that really want i_ino invented. Two functions?