mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Zhang Xincheng" <zhangxincheng@uniontech.com>
To: maz <maz@kernel.org>
Cc: tglx <tglx@linutronix.de>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	oleksandr <oleksandr@natalenko.name>,
	"Hans de Goede" <hdegoede@redhat.com>,
	bigeasy <bigeasy@linutronix.de>,
	"mark.rutland" <mark.rutland@arm.com>, michael <michael@walle.cc>
Subject: Re: [PATCH] interrupt: discover and disable very frequent interrupts
Date: Sun, 9 Oct 2022 09:31:36 +0800	[thread overview]
Message-ID: <tencent_48EE20EE67D50AC81A28CAAF@qq.com> (raw)
In-Reply-To: <868rm16tbu.wl-maz@kernel.org>

> Again: what makes you think that it is better to kill the interrupt
> than suffering a RCU stall? Yes, that's a lot of interrupts. But
> killing it and risking the whole system isn't an acceptable outcome.

It's really not good to kill interrupts directly. Perhaps a better way is
to report it and let the system administrator decide what to do with it.

+ if((desc->gap_count & 0xffff0000) == 0)
+ desc->gap_time = get_jiffies_64();
+
+ desc->gap_count ++;
+
+ if((desc->gap_count & 0x0000ffff) >= 2000) {
+ if((get_jiffies_64() - desc->gap_time) < HZ) {
+ desc->gap_count += 0x00010000;
+ desc->gap_count &= 0xffff0000;
+ } else {
+ desc->gap_count = 0;
+ }
+
+ if((desc->gap_count >> 16) > 30) {
+ __report_bad_irq(desc, action_ret, KERN_ERR "irq %d: triggered too frequently\n");
+ }
+ }
+


Thanks,

             Zhang Xincheng

  reply	other threads:[~2022-10-09  1:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-30  6:40 Zhang Xincheng
2022-09-30  7:05 ` Hans de Goede
2022-09-30  9:23 ` Marc Zyngier
2022-09-30  9:57   ` Zhang Xincheng
2022-09-30 10:37     ` Marc Zyngier
2022-10-09  1:31       ` Zhang Xincheng [this message]
2022-10-09  2:13         ` Marc Zyngier
2022-10-09 10:02           ` Zhang Xincheng
2022-10-17 11:21             ` Thomas Gleixner
2022-10-18  1:05               ` Zhang Xincheng
2022-10-08  5:21 ` [interrupt] 998288b7e8: RIP:cpuidle_enter_state kernel test robot
2022-09-30  8:31 [PATCH] interrupt: discover and disable very frequent interrupts 张鑫城

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=tencent_48EE20EE67D50AC81A28CAAF@qq.com \
    --to=zhangxincheng@uniontech.com \
    --cc=bigeasy@linutronix.de \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=michael@walle.cc \
    --cc=oleksandr@natalenko.name \
    --cc=tglx@linutronix.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

all inboxes | Powered by JetHome®