[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150317022358.8DE1D14011D@ozlabs.org>
Date: Tue, 17 Mar 2015 13:23:58 +1100 (AEDT)
From: Michael Ellerman <mpe@...erman.id.au>
To: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>,
Paul Mackerras <paulus@...ba.org>
Cc: peterz@...radead.org, linuxppc-dev@...ts.ozlabs.org,
linux-kernel@...r.kernel.org
Subject: Re: [8/9] powerpc/hv-24x7: Break up single_24x7_request
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.
>
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists