Thread (18 messages) flat view 18 messages, 2 authors, 2015-03-23

Re: [8/9] powerpc/hv-24x7: Break up single_24x7_request

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2015-03-17 02:24:00
Also in: lkml

On Tue, 2015-17-02 at 22:00:33 UTC, Sukadev Bhattiprolu wrote:
Break up the function single_24x7_request() into smaller functions.
This would later enable us to "prepare" a multi-event request
buffer and then submit a single hcall for several events.
This looks fine, though the names are a bit laboured.
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
index 3c36694..fde6211 100644
--- a/arch/powerpc/perf/hv-24x7.c
+++ b/arch/powerpc/perf/hv-24x7.c
@@ -1001,6 +1001,44 @@ static void log_24x7_hcall(struct hv_24x7_request_buffer *request_buffer,
 }
 
 /*
+ * Start the process for a new H_GET_24x7_DATA hcall.
+ */
+static void start_24x7_get_data(struct hv_24x7_request_buffer *request_buffer,
+			struct hv_24x7_data_result_buffer *result_buffer)
+{
Just init_24x7_request() ?
+
+	memset(request_buffer, 0, 4096);
+	memset(result_buffer, 0, 4096);
+
+	request_buffer->interface_version = HV_24X7_IF_VERSION_CURRENT;
+	/* memset above set request_buffer->num_requests to 0 */
+}
+
+/*
+ * Commit (i.e perform) the H_GET_24x7_DATA hcall using the data collected
+ * by 'start_24x7_get_data()' and 'add_event_to_24x7_request()'.
+ */
+static int commit_24x7_get_data(struct hv_24x7_request_buffer *request_buffer,
+			struct hv_24x7_data_result_buffer *result_buffer)
+{
It don't like "commit" that is a loaded term.

Just make_24x7_request() perhaps?


cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help