From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH 22/25] Generic dynamic per cpu refcounting Date: Thu, 29 Nov 2012 19:59:53 +0100 Message-ID: <20121129185953.GW16230@one.firstfloor.org> References: <1354121029-1376-1-git-send-email-koverstreet@google.com> <1354121029-1376-23-git-send-email-koverstreet@google.com> <20121129185720.GE15094@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andi Kleen , linux-kernel@vger.kernel.org, linux-aio@kvack.org, linux-fsdevel@vger.kernel.org, zab@redhat.com, bcrl@kvack.org, jmoyer@redhat.com, axboe@kernel.dk, viro@zeniv.linux.org.uk To: Kent Overstreet Return-path: Content-Disposition: inline In-Reply-To: <20121129185720.GE15094@google.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Nov 29, 2012 at 10:57:20AM -0800, Kent Overstreet wrote: > On Thu, Nov 29, 2012 at 10:45:04AM -0800, Andi Kleen wrote: > > Kent Overstreet writes: > > > > > This implements a refcount with similar semantics to > > > atomic_get()/atomic_dec_and_test(), that starts out as just an atomic_t > > > but dynamically switches to per cpu refcounting when the rate of > > > gets/puts becomes too high. > > > > This will only work if you put on the same CPU as you get, right? > > Nope, no such restriction. I don't see how you ensure you're doing the __this_cpu_dec on the same CPU as you did the get -Andi