[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180620142023.GL2494@hirez.programming.kicks-ass.net>
Date: Wed, 20 Jun 2018 16:20:23 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Waiman Long <longman@...hat.com>
Cc: Tejun Heo <tj@...nel.org>, Li Zefan <lizefan@...wei.com>,
Johannes Weiner <hannes@...xchg.org>,
Ingo Molnar <mingo@...hat.com>, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
kernel-team@...com, pjt@...gle.com, luto@...capital.net,
Mike Galbraith <efault@....de>, torvalds@...ux-foundation.org,
Roman Gushchin <guro@...com>,
Juri Lelli <juri.lelli@...hat.com>,
Patrick Bellasi <patrick.bellasi@....com>
Subject: Re: [PATCH v10 9/9] cpuset: Allow reporting of sched domain
generation info
On Mon, Jun 18, 2018 at 12:14:09PM +0800, Waiman Long wrote:
> +#ifdef CONFIG_DEBUG_KERNEL
> +static inline void debug_print_domains(cpumask_var_t *doms, int ndoms)
> +{
> + int i;
> + char buf[200];
> + char *ptr, *end = buf + sizeof(buf) - 1;
> +
> + for (i = 0, ptr = buf, *end = '\0'; i < ndoms; i++)
> + ptr += snprintf(ptr, end - ptr, "dom%d=%*pbl ", i,
> + cpumask_pr_args(doms[i]));
> +
> + pr_debug("Generated %d domains: %s\n", ndoms, buf);
> +}
Why not use pr_cont() and do away with that static buffer?
Powered by blists - more mailing lists