On 11/9/22 16:09, Dan Williams wrote:
> Signed-off-by: Dan Williams <[email protected]>
> ---
> ovsdb/ovsdb-server.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
Hi, Dan. Thanks for the patch!
It looks OK in general, see some comments inline.
Best regards, Ilya Maximets.
>
> diff --git a/ovsdb/ovsdb-server.c b/ovsdb/ovsdb-server.c
> index 7a6bfe0a03c09..c073a4f9a0a07 100644
> --- a/ovsdb/ovsdb-server.c
> +++ b/ovsdb/ovsdb-server.c
> @@ -1601,6 +1601,7 @@ ovsdb_server_memory_trim_on_compaction(struct
> unixctl_conn *conn,
> void *arg OVS_UNUSED)
> {
> const char *command = argv[1];
> + bool old_trim_memory = trim_memory;
Reverse x-mass tree.
>
> #if !HAVE_DECL_MALLOC_TRIM
> unixctl_command_reply_error(conn, "memory trimming is not supported");
> @@ -1615,8 +1616,10 @@ ovsdb_server_memory_trim_on_compaction(struct
> unixctl_conn *conn,
> unixctl_command_reply_error(conn, "invalid argument");
> return;
> }
> - VLOG_INFO("memory trimming after compaction %s.",
> - trim_memory ? "enabled" : "disabled");
> + if (trim_memory != old_trim_memory) {
> + VLOG_INFO("memory trimming after compaction %s.",
> + trim_memory ? "enabled" : "disabled");
> + }
Should we also log for the very first time even if the value
didn't change? It would be easier for someone inspecting the
log file to know if it was enabled or not.
> unixctl_command_reply(conn, NULL);
> }
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev