Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757954AbYFKAEV (ORCPT ); Tue, 10 Jun 2008 20:04:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754200AbYFKAED (ORCPT ); Tue, 10 Jun 2008 20:04:03 -0400 Received: from ozlabs.org ([203.10.76.45]:33677 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753674AbYFKAEC (ORCPT ); Tue, 10 Jun 2008 20:04:02 -0400 From: Rusty Russell To: Christoph Lameter Subject: Re: [patch 04/41] cpu ops: Core piece for generic atomic per cpu operations Date: Wed, 11 Jun 2008 10:03:36 +1000 User-Agent: KMail/1.9.9 Cc: Mike Travis , Andrew Morton , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , Eric Dumazet , Peter Zijlstra References: <20080530035620.587204923@sgi.com> <200806101256.31615.rusty@rustcorp.com.au> In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200806111003.37167.rusty@rustcorp.com.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1408 Lines: 38 On Tuesday 10 June 2008 13:18:25 Christoph Lameter wrote: > On Tue, 10 Jun 2008, Rusty Russell wrote: > > > Right that is what the cpu alloc patches do. So you could implement > > > cpu_local_inc on top of some of the cpu alloc patches. > > > > Or you could just implement it today as a standalone patch. > > You need at least the zero basing to enable the use of the segment > register on x86_64. Indeed. Works for i386 as is, but 64 bit will need that patch. > > > But then the whole point of local_t is gone. Why not use atomic_t in > > > the first place? > > > > Because some archs can do better. > > The argument does not make any sense. First you want to use atomic_t then > not? You're being obtuse. See previous mail about the three possible implementations of local_t, and the comment in asm-generic/local.h. The paths forward are clear: 1) Improve x86 local_t (mostly orthogonal to the others, but useful). 2) Implement extensible per-cpu areas. 3) Generalize per-cpu accessors. 4) Extend or replace the module.c per-cpu allocator to alloc from the other areas. 5) Convert alloc_percpu et al. to use the new code. Hope that clarifies, Rusty. -- 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/