[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1012070838020.25976@router.home>
Date: Tue, 7 Dec 2010 08:39:06 -0600 (CST)
From: Christoph Lameter <cl@...ux.com>
To: Balbir Singh <balbir@...ux.vnet.ibm.com>
cc: Michael Holzheu <holzheu@...ux.vnet.ibm.com>,
akpm@...ux-foundation.org, Pekka Enberg <penberg@...helsinki.fi>,
linux-kernel@...r.kernel.org,
Eric Dumazet <eric.dumazet@...il.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Tejun Heo <tj@...nel.org>, linux-mm@...ck.org
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists