mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: Andi Kleen <ak@muc.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86 performance counters driver 3.0-pre2 for 2.5.44: [2/4] x86 support
Date: Fri, 25 Oct 2002 14:25:49 +0200	[thread overview]
Message-ID: <15801.14413.909403.323948@kim.it.uu.se> (raw)
In-Reply-To: <m3wuo7omzg.fsf@averell.firstfloor.org>

Andi Kleen writes:
 > Mikael Pettersson <mikpe@csd.uu.se> 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.

Yes you're right. I didn't do this before because previous versions
needed to support 2.2/2.4 kernels and building it as a module.

For what values of cpu is per_cpu(var,cpu) valid? For those where
cpu_online(cpu) is true, or those where cpu_possible(cpu) is true?
(I need to convert a memset() on the per_cpu_cache[] array to the
per_cpu(,) framework.)

I'll fix this and announce a new version later today.

/Mikael

  reply	other threads:[~2002-10-25 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-24 15:00 Mikael Pettersson
2002-10-24 15:49 ` Andi Kleen
2002-10-25 12:25   ` Mikael Pettersson [this message]
2002-10-25 12:40     ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15801.14413.909403.323948@kim.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=ak@muc.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®