lkml.org 
[lkml]   [2003]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: per_cpu fixes
>>>>> On Thu, 10 Jul 2003 11:15:25 -0700 (PDT), Linus Torvalds <torvalds@osdl.org> 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/

\
 
 \ /
  Last update: 2005-03-22 13:46    [W:0.265 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site