From 667030bff6493768dc16f3b057bdd1cac3c2b1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 16 Feb 2022 08:07:02 +0100 Subject: [PATCH] manager: add {} around cpu sets, use range formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We would print "Setting NUMA policy to bind, with nodes .". This is not very clear, change it to "… with nodes {}.". Also use range formatting for masks to make output shorter. --- src/core/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/main.c b/src/core/main.c index 754a847541f..69960c1adaa 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1751,8 +1751,8 @@ static void update_cpu_affinity(bool skip_setup) { assert(arg_cpu_affinity.allocated > 0); - mask = cpu_set_to_string(&arg_cpu_affinity); - log_debug("Setting CPU affinity to %s.", strnull(mask)); + mask = cpu_set_to_range_string(&arg_cpu_affinity); + log_debug("Setting CPU affinity to {%s}.", strnull(mask)); if (sched_setaffinity(0, arg_cpu_affinity.allocated, arg_cpu_affinity.set) < 0) log_warning_errno(errno, "Failed to set CPU affinity, ignoring: %m"); @@ -1769,7 +1769,7 @@ static void update_numa_policy(bool skip_setup) { if (DEBUG_LOGGING) { policy = mpol_to_string(numa_policy_get_type(&arg_numa_policy)); nodes = cpu_set_to_range_string(&arg_numa_policy.nodes); - log_debug("Setting NUMA policy to %s, with nodes %s.", strnull(policy), strnull(nodes)); + log_debug("Setting NUMA policy to %s, with nodes {%s}.", strnull(policy), strnull(nodes)); } r = apply_numa_policy(&arg_numa_policy);