Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755497Ab3H1VKX (ORCPT ); Wed, 28 Aug 2013 17:10:23 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:54076 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753340Ab3H1VKV (ORCPT ); Wed, 28 Aug 2013 17:10:21 -0400 Date: Wed, 28 Aug 2013 14:10:19 -0700 From: Andrew Morton To: Kent Overstreet Cc: "Nicholas A. Bellinger" , target-devel , lf-virt , lkml , kvm-devel , "Michael S. Tsirkin" , Asias He , Jens Axboe , Tejun Heo , Ingo Molnar , Andi Kleen , Christoph Lameter , Oleg Nesterov , Christoph Lameter Subject: Re: [PATCH] percpu ida: Switch to cpumask_t, add some comments Message-Id: <20130828141019.25aff643c87e43ffafdbcb7e@linux-foundation.org> In-Reply-To: <20130828210010.GD1357@kmo-pixel> References: <1376694549-20609-1-git-send-email-nab@linux-iscsi.org> <1376694549-20609-2-git-send-email-nab@linux-iscsi.org> <20130820143157.f91bf59d16352989b54e431e@linux-foundation.org> <20130828195517.GF8032@kmo-pixel> <20130828132550.d0ce4d3a4d40ee07e7e8a1c1@linux-foundation.org> <20130828210010.GD1357@kmo-pixel> X-Mailer: Sylpheed 3.2.0beta5 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2080 Lines: 46 On Wed, 28 Aug 2013 14:00:10 -0700 Kent Overstreet wrote: > On Wed, Aug 28, 2013 at 01:25:50PM -0700, Andrew Morton wrote: > > On Wed, 28 Aug 2013 12:55:17 -0700 Kent Overstreet wrote: > > > > > Fixup patch, addressing Andrew's review feedback: > > > > Looks reasonable. > > > > > lib/idr.c | 38 +++++++++++++++++++++----------------- > > > > I still don't think it should be in this file. > > > > You say that some as-yet-unmerged patches will tie the new code into > > the old ida code. But will it do it in a manner which requires that > > the two reside in the same file? > > Not require, no - but it's just intimate enough with my ida rewrite that > I think it makes sense; it makes some use of stuff that should be > internal to the ida code. > > Mostly just sharing the lock though, since I got rid of the ida > interfaces that don't do locking, but percpu ida needs a lock that also > covers what ida needs. > > It also makes use of a ganged allocation interface, but there's no real > reason ida can't expose that, it's just unlikely to be useful to > anything but percpu ida. > > The other reason I think it makes sense to live in idr.c is more for > users of the code; as you pointed out as far as the user's perspective > percpu ida isn't doing anything fundamentally different from ida, so I > think it makes sense for the code to live in the same place as a > kindness to future kernel developers who are trying to find their way > around the various library code. I found things to be quite the opposite - it took 5 minutes of staring, head-scratching, double-checking and penny-dropping before I was confident that the newly-added code actually has nothing at all to do with the current code. Putting it in the same file was misleading, and I got misled. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/