Re: [PATCH] fs/proc/uptime.c: fix idle time reporting in /proc/uptime
From: Josh Don
Date: Thu Aug 12 2021 - 17:17:43 EST
On Thu, Aug 12, 2021 at 1:42 PM Eric Dumazet <edumazet@xxxxxxxxxx> wrote:
>
> Not sure why you moved get_idle_time() in kernel/sched/cputime.c
>
> For builds where CONFIG_PROC_FS is not set, this function is not used/needed.
Consolidate the kernel idle accounting code; seemed a little strange
to have this implemented in proc/stat.c, especially if it also needed
to be used elsewhere.
Does a __maybe_unused/#ifdef CONFIG_PROC_FS seem reasonable, or would
you advocate leaving it in fs/proc?