From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Lameter Subject: [patch 31/41] VM statistics: Use CPU ops Date: Thu, 29 May 2008 20:56:51 -0700 Message-ID: <20080530040021.460464557@sgi.com> References: <20080530035620.587204923@sgi.com> Return-path: Received: from relay1.sgi.com ([192.48.171.29]:45461 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753056AbYE3EAX (ORCPT ); Fri, 30 May 2008 00:00:23 -0400 Content-Disposition: inline; filename=cpu_alloc_ops_vmstat Sender: linux-arch-owner@vger.kernel.org List-ID: To: akpm@linux-foundation.org Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, David Miller , Eric Dumazet , Peter Zijlstra , Rusty Russell , Mike Travis The use of CPU ops here avoids the offset calculations that we used to have to do with per cpu operations. The result of this patch is that event counters are coded with a single instruction the following way: incq %gs:offset(%rip) Without these patches this was: mov %gs:0x8,%rdx mov %eax,0x38(%rsp) mov xxx(%rip),%eax mov %eax,0x48(%rsp) mov varoffset,%rax incq 0x110(%rax,%rdx,1) Signed-off-by: Christoph Lameter