[PATCH 2.6.12-rc1-mm3 0/3] perfctr: mapped state cleanup: overview

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew,

This set of patches change the layout of the perfctr cpu state object.
This state is mmap()able, providing a low-overhead sampling method to
user-space. But in order to limit the number of cache lines touched
at frequent operations (context switches and explicit samplings), some
kernel-private fields are unfortunately visible to user-space near the
start of the counter state object. This is both ugly and prevents the
kernel from ever changing the size of those fields.

This issue is fixed now as follows:
- The fields are reordered slightly. The freqently accessed kernel-private
  fields are now first, followed by the user-visible fields. This doesn't
  change the number of cache lines touched.
- The now contiguous user-visible fields are moved to a sub-struct.
- The kernel-private types are moved out of the user-visible parts of
  <asm-$arch/perfctr.h>.
- When mmap()ing a perfctr object, user-space must now add an offset
  to the mapping's address in order to reach the user-visible state.
  That offset is exported via a new perfctr sysfs attribute.

This is a simple straightforward change, but the patches get large
because a large number of field accesses must be adjusted.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux