[PATCH Utopic SRU] powerpc/perf/hv-24x7: Simplify catalog_read()

Sukadev Bhattiprolu sukadev at linux.vnet.ibm.com
Thu Oct 23 01:28:40 UTC 2014

Chris J Arges [chris.j.arges at canonical.com] wrote:
| On 10/13/2014 04:14 AM, tim.gardner at canonical.com wrote:
| > From: "sukadev at linux.vnet.ibm.com" <sukadev at linux.vnet.ibm.com>
| > 
| > BugLink: http://bugs.launchpad.net/bugs/1380432
| > 
| > catalog_read() implements the read interface for the sysfs file
| > 
| > 	/sys/bus/event_source/devices/hv_24x7/interface/catalog
| > 
| > It essentially takes a buffer, an offset and count as parameters
| > to the read() call.  It makes a hypervisor call to read a specific
| > page from the catalog and copy the required bytes into the given
| > buffer. Each call to catalog_read() returns at most one 4K page.
| > 
| > Given these requirements, we should be able to simplify the
| > catalog_read().
| > 
| > Signed-off-by: Sukadev Bhattiprolu <sukadev at linux.vnet.ibm.com>
| > Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
| > (cherry picked from commit 56f12bee55d740dc47eed0ca9d5c72cffdffd6cf)
| > Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
| I've tried verifying a build with this patch on top of our current 3.16
| Utopic tree and the above sysfs directory was still not found. Are there
| additional steps required to enable the hv_24x7 device? I have been
| testing on a POWER8 machine.

(I responded to the bugzilla but missed this mail)

It needs CONFIG_HV_PERF_CTRS=y (which I see is set in my /boot/config*)
and also needs to be on an lpar (PowerVM guest). There is a check in
hv_24x7_init() for the lpar.


More information about the kernel-team mailing list