mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bitao Hu <yaoma@linux.alibaba.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Doug Anderson <dianders@chromium.org>
Cc: liusong@linux.alibaba.com, akpm@linux-foundation.org,
	pmladek@suse.com, kernelfans@gmail.com, deller@gmx.de,
	npiggin@gmail.com, tsbogend@alpha.franken.de,
	James.Bottomley@hansenpartnership.com, jan.kiszka@siemens.com,
	linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	yaoma@linux.alibaba.com
Subject: Re: [PATCHv11 2/4] genirq: Provide a snapshot mechanism for interrupt statistics
Date: Tue, 5 Mar 2024 18:57:34 +0800	[thread overview]
Message-ID: <28a24e4b-c322-4631-ad6d-7259ca3d084d@linux.alibaba.com> (raw)
In-Reply-To: <87wmqiulaw.ffs@tglx>

Hi,

On 2024/3/4 22:24, Thomas Gleixner wrote:
> The above is not even configurable by the user. It's only selectable by
> some other config option.
> 
>> +# Snapshot for interrupt statistics
>> +config GENERIC_IRQ_STAT_SNAPSHOT
>> +       bool
>> +       help
>> +
>> +         Say Y here to enable the kernel to provide a snapshot mechanism
>> +         for interrupt statistics.
> 
> That makes is visible which is pointless because it's only relevant when
> there is an actual user.
I guess I may have misunderstood your intentions earlier. Initially, I
thought you were suggesting that when "SOFTLOCKUP_DETECTOR_INTR_STORM"
is not enabled, people should be able to choose
"GENERIC_IRQ_STAT_SNAPSHOT" through menuconfig, so I attempted to make
"GENERIC_IRQ_STAT_SNAPSHOT" visible to the user. However, after
analyzing the previous emails, it seems that what you were actually
proposing was to directly disable "GENERIC_IRQ_STAT_SNAPSHOT" when
"SOFTLOCKUP_DETECTOR_INTR_STORM" is not enabled, as a way to save
memory. If my current understanding is correct, then the code for that
part would look something like the following.

Does this align with your expectations?

Best Regards,
	Bitao Hu

diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig
index 2531f3496ab6..a28e5ac5fc79 100644
--- a/kernel/irq/Kconfig
+++ b/kernel/irq/Kconfig
@@ -108,6 +108,10 @@ config GENERIC_IRQ_MATRIX_ALLOCATOR
  config GENERIC_IRQ_RESERVATION_MODE
         bool

+# Snapshot for interrupt statistics
+config GENERIC_IRQ_STAT_SNAPSHOT
+       bool
+
  # Support forced irq threading
  config IRQ_FORCED_THREADING
         bool
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 49f652674bd8..899b69fcb598 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1032,6 +1032,7 @@ config SOFTLOCKUP_DETECTOR
  config SOFTLOCKUP_DETECTOR_INTR_STORM
         bool "Detect Interrupt Storm in Soft Lockups"
         depends on SOFTLOCKUP_DETECTOR && IRQ_TIME_ACCOUNTING
+       select GENERIC_IRQ_STAT_SNAPSHOT
         default y if NR_CPUS <= 128
         help
           Say Y here to enable the kernel to detect interrupt storm







  reply	other threads:[~2024-03-05 10:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-28  7:22 [PATCHv11 0/4] *** Detect interrupt storm in softlockup *** Bitao Hu
2024-02-28  7:22 ` [PATCHv11 1/4] watchdog/softlockup: low-overhead detection of interrupt storm Bitao Hu
2024-02-28  7:22 ` [PATCHv11 2/4] genirq: Provide a snapshot mechanism for interrupt statistics Bitao Hu
2024-02-28 22:44   ` Doug Anderson
2024-03-01 19:22     ` Thomas Gleixner
2024-03-04 12:00       ` Bitao Hu
2024-03-04 14:24         ` Thomas Gleixner
2024-03-05 10:57           ` Bitao Hu [this message]
2024-03-05 16:57             ` Thomas Gleixner
2024-03-06 11:09               ` Bitao Hu
2024-02-28  7:22 ` [PATCHv11 3/4] genirq: Avoid summation loops for /proc/interrupts Bitao Hu
2024-02-28 22:44   ` Doug Anderson
2024-02-28  7:22 ` [PATCHv11 4/4] watchdog/softlockup: report the most frequent interrupts Bitao Hu
2024-02-28 22:44   ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28a24e4b-c322-4631-ad6d-7259ca3d084d@linux.alibaba.com \
    --to=yaoma@linux.alibaba.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=deller@gmx.de \
    --cc=dianders@chromium.org \
    --cc=jan.kiszka@siemens.com \
    --cc=kernelfans@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=liusong@linux.alibaba.com \
    --cc=npiggin@gmail.com \
    --cc=pmladek@suse.com \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome