Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S264676AbTGJSHd (ORCPT ); Thu, 10 Jul 2003 14:07:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269590AbTGJSHd (ORCPT ); Thu, 10 Jul 2003 14:07:33 -0400 Received: from palrel10.hp.com ([156.153.255.245]:6593 "EHLO palrel10.hp.com") by vger.kernel.org with ESMTP id S264676AbTGJSH0 (ORCPT ); Thu, 10 Jul 2003 14:07:26 -0400 From: David Mosberger MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16141.44749.105050.260268@napali.hpl.hp.com> Date: Thu, 10 Jul 2003 11:22:05 -0700 To: Linus Torvalds Cc: davidm@hpl.hp.com, Rusty Russell , Kernel Mailing List , Subject: Re: per_cpu fixes In-Reply-To: References: <16141.43130.657025.952793@napali.hpl.hp.com> X-Mailer: VM 7.07 under Emacs 21.2.1 Reply-To: davidm@hpl.hp.com X-URL: http://www.hpl.hp.com/personal/David_Mosberger/ Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1441 Lines: 35 >>>>> On Thu, 10 Jul 2003 11:15:25 -0700 (PDT), Linus Torvalds said: Linus> On Thu, 10 Jul 2003, David Mosberger wrote: >> >> You mean there would be three primitives: >> >> (1) get value from a per-CPU variable >> (2) set value of a per-CPU variable >> (3) get the (canonical) address of a per-CPU variable Linus> Argh. Linus> We'd better have the rule that if there are any virtual Linus> caches or other issues, then the "canonical address" had Linus> better be the _only_ address (or at least any virtual Linus> remapping has to be done in such a way that it never causes Linus> aliasing or other performance problems with the canonical Linus> address). Linus> This is already turning fairly ugly, and I just don't want to Linus> see even more ugly rules like "you can't mix direct accesses Linus> with pointer accesses" Yes, Rusty's proposal (as I think I summarized above) would do exactly that: the only address that you'll ever see for a per-CPU variable will be the canonical one. The get/set macros can use an alias on platforms where this is more efficient, but the alias will never be visible outside the macros. --david - 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/