[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALOAHbDGSpDnzQ7AKiMci0708DwYr8gmruVGdJZ_Nt9rmnbxNg@mail.gmail.com>
Date: Wed, 7 May 2025 19:42:01 +0800
From: Yafang Shao <laoar.shao@...il.com>
To: Ingo Molnar <mingo@...nel.org>
Cc: Peter Zijlstra <peterz@...radead.org>, ardb@...nel.org, arnd@...db.de, bp@...en8.de,
dwmw@...zon.co.uk, hpa@...or.com, linux-kernel@...r.kernel.org,
michal.lkml@...kovi.net, tglx@...utronix.de, torvalds@...ux-foundation.org,
vkuznets@...hat.com, yamada.masahiro@...ionext.com
Subject: Re: [PATCH 13/15] x86/kconfig/64: Enable popular scheduler, cgroups
and namespaces options in the defconfig
On Wed, May 7, 2025 at 3:06 PM Ingo Molnar <mingo@...nel.org> wrote:
>
>
> * Yafang Shao <laoar.shao@...il.com> wrote:
>
> > Hello Mingo,
> >
> > > +CONFIG_VIRT_CPU_ACCOUNTING_GEN=y
> > > +CONFIG_IRQ_TIME_ACCOUNTING=y
> >
> > Enabling CONFIG_IRQ_TIME_ACCOUNTING=y can lead to user-visible behavioral
> > changes. For more context, please refer to the related discussion here:
> > https://lore.kernel.org/all/20241222024734.63894-1-laoar.shao@gmail.com/ .
>
> Yeah. I actually agree with your series. It (re-)includes IRQ/softirq
> time in task CPU usage statistics even under IRQ_TIME_ACCOUNTING=y,
> while still keeping the finegrained IRQ/softirq statistics as well,
> correct?
Correct.
>
> The Kconfig option is also arguably rather misleading:
>
> config IRQ_TIME_ACCOUNTING
> bool "Fine granularity task level IRQ time accounting"
> depends on HAVE_IRQ_TIME_ACCOUNTING && !VIRT_CPU_ACCOUNTING_NATIVE
> help
> Select this option to enable fine granularity task irq time
> accounting. This is done by reading a timestamp on each
> transitions between softirq and hardirq state, so there can be a
> small performance impact.
>
> It only warns about a small performance impact, but doesn't warn that
> CPU accounting is changed in an incompatible fashion that surprises
> tooling...
Yes, this breaks our userspace tools.
>
> But I think we should probably treat this as a bug, not as lack of
> documentation. Peter, do you concur?
>
> > If we decide to enable it by default, we should clearly document this
> > behavior change. Below is the patch I wrote earlier but haven’t sent
> > out for review yet.
>
> Note that it's not enabled by default - this patch is just about the
> x86 defconfig.
>
> Thanks,
>
> Ingo
--
Regards
Yafang
Powered by blists - more mailing lists