2020-12-03 06:51:04

by Yunfeng Ye

[permalink] [raw]
Subject: [PATCH 1/2] sched: Move '\n' to the prior seq_printf in show_schedstat()

A little clean up that moving the '\n' to the prior seq_printf. and
remove the separate seq_printf which for line breaks.

No functional changes.

Signed-off-by: Yunfeng Ye <[email protected]>
---
kernel/sched/stats.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/sched/stats.c b/kernel/sched/stats.c
index 750fb3c67eed..e99403df3f90 100644
--- a/kernel/sched/stats.c
+++ b/kernel/sched/stats.c
@@ -30,15 +30,13 @@ static int show_schedstat(struct seq_file *seq, void *v)

/* runqueue-specific stats */
seq_printf(seq,
- "cpu%d %u 0 %u %u %u %u %llu %llu %lu",
+ "cpu%d %u 0 %u %u %u %u %llu %llu %lu\n",
cpu, rq->yld_count,
rq->sched_count, rq->sched_goidle,
rq->ttwu_count, rq->ttwu_local,
rq->rq_cpu_time,
rq->rq_sched_info.run_delay, rq->rq_sched_info.pcount);

- seq_printf(seq, "\n");
-
#ifdef CONFIG_SMP
/* domain-specific stats */
rcu_read_lock();
--
2.18.4


2020-12-03 09:43:37

by Mel Gorman

[permalink] [raw]
Subject: Re: [PATCH 1/2] sched: Move '\n' to the prior seq_printf in show_schedstat()

On Thu, Dec 03, 2020 at 02:46:23PM +0800, Yunfeng Ye wrote:
> A little clean up that moving the '\n' to the prior seq_printf. and
> remove the separate seq_printf which for line breaks.
>
> No functional changes.
>
> Signed-off-by: Yunfeng Ye <[email protected]>

Acked-by: Mel Gorman <[email protected]>

--
Mel Gorman
SUSE Labs