lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9b31f1df-7dc6-468b-9418-0b13239df8bc@gmail.com>
Date: Wed, 7 May 2025 11:00:38 +0800
From: Yafang Shao <laoar.shao@...il.com>
To: mingo@...nel.org
Cc: 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,
 peterz@...radead.org, 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

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/ .

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.

----

Subject: [PATCH] init/Kconfig: document behavior change when enabling
  IRQ_TIME_ACCOUNTING

After we enabled CONFIG_IRQ_TIME_ACCOUNTING, we noticed that the IRQ
usage is not accounted to the tasks and thus not accounted to the CPU
cgroup neither. This behavior change results in issues [0] in our
production servers and finally we have to revert it.

We'd better clearly document this behavior change in case it might
matter to the user.

Link: 
https://lore.kernel.org/all/20241222024734.63894-1-laoar.shao@gmail.com/ [0]
Suggested-by: "Michal KoutnĂ˝" <mkoutny@...e.com>
Signed-off-by: Yafang Shao <laoar.shao@...il.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Johannes Weiner <hannes@...xchg.org>
Cc: Vincent Guittot <vincent.guittot@...aro.org>
---
  init/Kconfig | 8 ++++++++
  1 file changed, 8 insertions(+)

diff --git a/init/Kconfig b/init/Kconfig
index a20e6efd3f0f..191df0b5cf1c 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -563,6 +563,14 @@ config IRQ_TIME_ACCOUNTING
        transitions between softirq and hardirq state, so there can be a
        small performance impact.

+      Enabling IRQ_TIME_ACCOUNTING excludes IRQ usage from the CPU usage
+      statistics of individual tasks and, consequently, it is not accounted
+      for in CPU cgroups. As a result, a task's CPU usage will accurately
+      reflect only its user time and system time. IRQ usage is instead
+      attributed at the global level and can be observed in metrics such as
+      /proc/stat or, potentially, at the cgroup level in files like
+      irq.pressure.
+
        If in doubt, say N here.

  config HAVE_SCHED_AVG_IRQ

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ