lkml.org 
[lkml]   [2008]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 04/41] cpu ops: Core piece for generic atomic per cpu operations
Date
On Wednesday 11 June 2008 03:42:15 Christoph Lameter wrote:
> 1. The x86 implementation does not exist because the segment register has
> so far not been available on x86_64. So you could not do the solution.
> You need the zero basing. Then you can use per_xxx_add in cpu_inc.

Yes: for 64 bit x86, getting rid of the PDA or zero-basing is required.

> 2. The general solution created overhead that is often not needed. If we
> would have done vm event counters with local_t then we would have
> atomic overhead for each increment on f.e. IA64. That was not
> acceptable. cpu_alloc never falls back to atomic operations.

You can implement it either way. I've said that three times now. The current
generic one uses atomics, but preempt disable/enable is possible.

> 3. local_t is based on the atomic logic. But percpu handling is
> fundamentally different in that accesses without the special macros
> are okay provided you are in a non preemptible or irq context!
> A local_t declaration makes such accesses impossible.

Again, untrue. The interface is already there. So feel free to implement
__cpu_local_inc et al in terms of preempt enable and disable so it doesn't
need to use atomics.

> 4. The modeling of local_t on atomic_t limits it to 32bit!

Again wrong. And adding an exclamation mark doesn't make it true.

Rusty.


\
 
 \ /
  Last update: 2008-06-11 13:13    [W:0.283 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site