[ovs-dev] [PATCH] json: Use reference counting in json objects

Ryan Moats rmoats at us.ibm.com
Thu Aug 25 15:27:30 UTC 2016



"dev" <dev-bounces at openvswitch.org> wrote on 08/16/2016 04:50:37 PM:

> From: "Rodriguez Betancourt, Esteban" <estebarb at hpe.com>
> To: "dev at openvswitch.org" <dev at openvswitch.org>
> Date: 08/16/2016 04:50 PM
> Subject: [ovs-dev] [PATCH] json: Use reference counting in json objects
> Sent by: "dev" <dev-bounces at openvswitch.org>
>
> After profiling OVSDB insert performance it was found
> that some significant portion of its time OVSDB is
> calling the function json_clone.
>
> Also, most of the usages of json_clone never modify the json,
> just keeps it to prevent it to be freed.
>
> With that in mind the struct json, json_create, json_clone
> and json_destroy were modified to keep a count of how many
> references of the json struct are left. Only when that count
> reaches zero the json struct is freed.
>
> The old "json_clone" function was renamed as "json_deep_clone".
>
> The change provides some performance improvement, depending
> on the transactions performed in OVSDB.
>
> Signed-off-by: Esteban Rodriguez Betancourt <estebarb at hpe.com>
> ---

Can you add some quantification of the statement
"provides some performance improvement"?



More information about the dev mailing list