Re: [patch 04/41] cpu ops: Core piece for generic atomic per cpu operations

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Christoph Lameter
Date: Thursday, May 29, 2008 - 11:12 pm

On Thu, 29 May 2008, Andrew Morton wrote:


No its not! In order to increment a per cpu value you need to calculate 
the per cpu pointer address in the current per cpu segment. local_t 
cannot do that in an atomic (wrt interrupt/preempt fashion) fashion. cpu 
ops can use a segment prefix and thus the insructions can calculate the 
per cpu adress and perform the atomic inc without disabling preempt or 
interrupts.

local_t is only useful when you disable interrupt or premption otherwise. 
But then you could also use a regular increment.


With cpu_alloc they are the same. They allocate from the same per cpu 
area.

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 04/41] cpu ops: Core piece for generic atomic per c ..., Christoph Lameter, (Thu May 29, 8:56 pm)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Thu May 29, 10:17 pm)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Thu May 29, 11:12 pm)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Fri May 30, 11:00 am)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Mon Jun 9, 12:00 pm)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Tue Jun 10, 10:42 am)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Tue Jun 10, 5:15 pm)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Wed Jun 11, 4:39 pm)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Thu Jun 12, 10:19 am)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Thu Jun 12, 7:27 pm)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Mon Jun 16, 7:52 am)
Re: [patch 04/41] cpu ops: Core piece for generic atomic p ..., Christoph Lameter, (Mon Jun 16, 7:29 pm)