Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754415Ab3H0UnT (ORCPT ); Tue, 27 Aug 2013 16:43:19 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:40930 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754369Ab3H0UnR (ORCPT ); Tue, 27 Aug 2013 16:43:17 -0400 Date: Tue, 27 Aug 2013 13:43:14 -0700 From: Andrew Morton To: "Nicholas A. Bellinger" Cc: target-devel , lkml , "Michael S. Tsirkin" , Asias He , Kent Overstreet , Jens Axboe , Tejun Heo , Ingo Molnar , Andi Kleen , Christoph Lameter , Oleg Nesterov , Christoph Lameter Subject: Re: [PATCH-v4 1/6] idr: Percpu ida Message-Id: <20130827134314.7e9f8b792023eba41b4ea93d@linux-foundation.org> In-Reply-To: <1377634306-13981-2-git-send-email-nab@linux-iscsi.org> References: <1377634306-13981-1-git-send-email-nab@linux-iscsi.org> <1377634306-13981-2-git-send-email-nab@linux-iscsi.org> 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: 1431 Lines: 28 On Tue, 27 Aug 2013 20:11:41 +0000 "Nicholas A. Bellinger" wrote: > Percpu frontend for allocating ids. With percpu allocation (that works), > it's impossible to guarantee it will always be possible to allocate all > nr_tags - typically, some will be stuck on a remote percpu freelist > where the current job can't get to them. > > We do guarantee that it will always be possible to allocate at least > (nr_tags / 2) tags - this is done by keeping track of which and how many > cpus have tags on their percpu freelists. On allocation failure if > enough cpus have tags that there could potentially be (nr_tags / 2) tags > stuck on remote percpu freelists, we then pick a remote cpu at random to > steal from. > > Note that there's no cpu hotplug notifier - we don't care, because > steal_tags() will eventually get the down cpu's tags. We _could_ satisfy > more allocations if we had a notifier - but we'll still meet our > guarantees and it's absolutely not a correctness issue, so I don't think > it's worth the extra code. Except for one silly trivial thing, all of my August 20 review comments were ignored. You didn't even bother replying to the email. -- 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/