All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][2.6.11-mm3] perfctr API update 0/9: overview
@ 2005-03-12 23:17 Mikael Pettersson
  0 siblings, 0 replies; only message in thread
From: Mikael Pettersson @ 2005-03-12 23:17 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel

Andrew,

This is the last planned major perfctr API update.

This set of patches change how control data is communicated
between user-space and the kernel. The main idea is that the
control data is partitioned into "domains", and each domain is
given its own representation. The design principles were:
- Data directly corresponding to CPU register contents is sent
  in variable-length <number,value> arrays. This allows us to
  handle future CPUs with more control registers without
  breaking any binary structure layouts.
  The register numbers used are the natural numbers for that
  platform, i.e. MSR numbers on x86 and SPR numbers on PPC.
- Potentially variable-length arrays are not embedded in other
  API-visible structures, but are in separate domains.
  This allows for larger arrays in the future, and it also allows
  user-space to pass only as much data as is necessary.
  The virtual-to-physical counter mapping is handled this way.
- Simple purely software-defined structures are Ok, as long as
  they don't contain variable-length data or CPU register values.
- No embedded user-space pointers anywhere, to avoid having to
  special-case 32-bit binaries on 64-bit kernels.

The API write function takes a <domain,data,datalen> triple,
interprets the data given the domain, and updates the in-kernel
control structures accordingly. The API read function is similar.

Implementing this is done in a sequence of four logical steps:
1. The low-level drivers are adjusted to use physical register
   numbers not virtual ones when indexing their control structures.
   This is needed because with the new API, the user's control
   data will be a physically-indexed image of the CPU state, not a
   virtually-indexed image as before.
2. Common header fields in the low-level control structures are
   broken out into a separate structure. This is because those
   fields form a separate domain in the new API.
3. The low-level drivers are extended with an in-kernel API for
   writing control data in <domain,data,datalen> form to the
   control structure. A similar read API is also added.
4. sys_vperfctr_write() and sys_vperfctr_read() are converted to
   the new domain-based form.

These changes require an updated user-space library, which I'll
release tomorrow.

After this there will be some minor cleanups, and then I'll start
merging David Gibson's ppc64 driver.

/Mikael

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-12 23:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-12 23:17 [PATCH][2.6.11-mm3] perfctr API update 0/9: overview Mikael Pettersson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.