Messages in this thread | | | Date | Tue, 7 Dec 2010 08:39:06 -0600 (CST) | From | Christoph Lameter <> | Subject | Re: [thisops uV3 08/18] Taskstats: Use this_cpu_ops |
| |
On Mon, 6 Dec 2010, Balbir Singh wrote:
> > Correct. We need to subtract one from that (which will eliminate the minus > > -1 that the inline this_cpu_inc_return creates). > > > > But that breaks current behaviour, we should probably initialize all > of the array to -1?
Not necessary. This_cpu_inc() uses an xadd instruction which retrieves the value and then increments the memory location. Then it adds 1. The -1 eliminates that add.
| |