mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "liujian (CE)" <liujian56@huawei.com>
To: Hillf Danton <hdanton@sina.com>
Cc: <edumazet@google.com>, <peterz@infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 9/9] softirq, timer: Use softirq_needs_break()
Date: Mon, 8 May 2023 11:51:07 +0800	[thread overview]
Message-ID: <f3241001-d9ff-703d-9e9c-9f8c888edf3f@huawei.com> (raw)
In-Reply-To: <20230505135553.4248-1-hdanton@sina.com>



On 2023/5/5 21:55, Hillf Danton wrote:
> On 5 May 2023 19:33:15 +0800 Liu Jian <liujian56@huawei.com>
>> In the while loop of __run_timers(), because there are too many timers or
>> improper timer handler functions, if the processing time of the expired
>> timers is always greater than the time wheel's next_expiry, the function
>> will loop infinitely.
>>
>> To prevent this, use the timeout/break logic provided by SoftIRQs. If the
>> running time exceeds the limit, break the loop and an additional
>> TIMER_SOFTIRQ is triggered.
> 
> This can not be a correct fix without getting every timer hog that runs
> longer than MAX_SOFTIRQ_TIME identified first and fixed.
> Do you mean that the timer that takes too long to execute needs to be 
fixed first? Let's ignore this problem here. The modification is only 
used to ensure that the loop exits when the loop execution time in 
__run_timers() exceeds MAX_SOFTIRQ_TIME.

> The same applies to any softirq in general.
> 

      parent reply	other threads:[~2023-05-08  3:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-05 11:33 [PATCH 0/9] fix softlockup in run_timer_softirq Liu Jian
2023-05-05 11:33 ` [PATCH 1/9] softirq: Rewrite softirq processing loop Liu Jian
2023-05-05 11:33 ` [PATCH 2/9] softirq: Use sched_clock() based timeout Liu Jian
2023-05-08  4:08   ` Jason Xing
2023-05-08 17:51     ` Thomas Gleixner
2023-05-05 11:33 ` [PATCH 3/9] softirq: Factor loop termination condition Liu Jian
2023-05-05 11:33 ` [PATCH 4/9] softirq: Allow early break Liu Jian
2023-05-05 12:10   ` Eric Dumazet
2023-05-08  3:37     ` liujian (CE)
2023-05-05 11:33 ` [PATCH 5/9] softirq: Context aware timeout Liu Jian
2023-05-05 11:33 ` [PATCH 6/9] softirq: Provide a softirq_needs_break() API Liu Jian
2023-05-05 11:33 ` [PATCH 7/9] softirq,net: Use softirq_needs_break() Liu Jian
2023-05-08  6:21   ` Jason Xing
2023-05-05 11:33 ` [PATCH 8/9] softirq,rcu: " Liu Jian
2023-05-05 11:33 ` [PATCH 9/9] softirq, timer: " Liu Jian
     [not found] ` <20230505135553.4248-1-hdanton@sina.com>
2023-05-08  3:51   ` liujian (CE) [this message]

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=f3241001-d9ff-703d-9e9c-9f8c888edf3f@huawei.com \
    --to=liujian56@huawei.com \
    --cc=edumazet@google.com \
    --cc=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /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®