All of lore.kernel.org
 help / color / mirror / Atom feed
* [Accel-config] Re: [PATCH 2/2] accel-config: Add occupancy attribute to json wq object
@ 2021-08-11 15:28 Dave Jiang
  0 siblings, 0 replies; only message in thread
From: Dave Jiang @ 2021-08-11 15:28 UTC (permalink / raw)
  To: accel-config

[-- Attachment #1: Type: text/plain, Size: 993 bytes --]


On 8/10/2021 7:57 PM, ramesh.thomas(a)intel.com wrote:
> From: Ramesh Thomas <ramesh.thomas(a)intel.com>
>
> Add a json object for occupancy attribute in wq properties.

Not sure if we should bother. This value is only useful in the moment. 
There's not much value to display the stale output.


>
> Signed-off-by: Ramesh Thomas <ramesh.thomas(a)intel.com>
> ---
>   util/json.c | 7 +++++++
>   1 file changed, 7 insertions(+)
>
> diff --git a/util/json.c b/util/json.c
> index 09d3a10..bd3f1ba 100644
> --- a/util/json.c
> +++ b/util/json.c
> @@ -461,6 +461,13 @@ struct json_object *util_wq_to_json(struct accfg_wq *wq,
>   	if (jobj)
>   		json_object_object_add(jaccfg, "ats_disable", jobj);
>   
> +	int_val = accfg_wq_get_occupancy(wq);
> +	if (int_val >= 0) {
> +		jobj = json_object_new_int(int_val);
> +		if (jobj)
> +			json_object_object_add(jaccfg, "occupancy", jobj);
> +	}
> +
>   	if (!(flags & UTIL_JSON_SAVE)) {
>   
>   		switch (wq_state) {

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

only message in thread, other threads:[~2021-08-11 15:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 15:28 [Accel-config] Re: [PATCH 2/2] accel-config: Add occupancy attribute to json wq object Dave Jiang

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.