From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 24 Oct 2002 11:43:58 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 24 Oct 2002 11:43:57 -0400 Received: from zero.aec.at ([193.170.194.10]:19973 "EHLO zero.aec.at") by vger.kernel.org with ESMTP id ; Thu, 24 Oct 2002 11:43:57 -0400 To: Mikael Pettersson Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86 performance counters driver 3.0-pre2 for 2.5.44: [2/4] x86 support References: <200210241500.RAA03585@kim.it.uu.se> From: Andi Kleen Date: 24 Oct 2002 17:49:55 +0200 In-Reply-To: <200210241500.RAA03585@kim.it.uu.se> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Mikael Pettersson writes: > +struct per_cpu_cache { /* roughly a subset of perfctr_cpu_state */ > + union { > + unsigned int p5_cesr; > + unsigned int id; /* cache owner id */ > + } k1; > + struct { > + /* NOTE: these caches have physical indices, not virtual */ > + unsigned int evntsel[18]; > + unsigned int escr[0x3E2-0x3A0]; > + unsigned int pebs_enable; > + unsigned int pebs_matrix_vert; > + } control; > +} __attribute__((__aligned__(SMP_CACHE_BYTES))); > +static struct per_cpu_cache per_cpu_cache[NR_CPUS] __cacheline_aligned; This should use per cpu data (asm/percpu.h) to save memory. -Andi