From: "Jan Beulich" Subject: Re: performance counters Date: Thu, 15 Mar 2007 13:57:03 +0000 Message-ID: <45F95EBF.76E4.0078.0@novell.com> References: <45F93B96.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >>> Keir Fraser 15.03.07 12:58 >>> >On 15/3/07 11:27, "Jan Beulich" wrote: > >> In order to be meaningful and usable together with other measuring methods, >> their use in my opinion should impose as little overhead as possible. With >> that, >> I wonder why per-cpu counters use atomic operations. > >Well, they shouldn't be. Nearly all (apart from the array/histogram ones) >are per-cpu anyway. And even if they weren't, a few lost increments wouldn't >matter (assuming the read and write parts of the increment are each >themselves atomic -- otherwise you could get worse write-conflict problems >like word tearing). Hmm, I wouldn't want to do away with the atomicity here altogether. That, however, would imply adding knowledge about the field name of the atomic_t to include/xen/perfc.h (and hence imply that all architectures use the same name here). Would you consider this acceptable? Jan