Skip to content

Commit 2f3672c

Browse files
committed
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner: "Two oneliners addressing NOHZ failures: - Use a bitmask to check for the pending timer softirq and not the bit number. The existing code using the bit number checked for the wrong bit, which caused timers to either expire late or stop completely. - Make the nohz evaluation on interrupt exit more robust. The existing code did not re-arm the hardware when interrupting a running softirq in task context (ksoftirqd or tail of local_bh_enable()), which caused timers to either expire late or stop completely" * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: nohz: Fix missing tick reprogram when interrupting an inline softirq nohz: Fix local_timer_softirq_pending()
2 parents 0cdf6d4 + 0a0e082 commit 2f3672c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

kernel/softirq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ static inline void tick_irq_exit(void)
390390

391391
/* Make sure that timer wheel updates are propagated */
392392
if ((idle_cpu(cpu) && !need_resched()) || tick_nohz_full_cpu(cpu)) {
393-
if (!in_interrupt())
393+
if (!in_irq())
394394
tick_nohz_irq_exit();
395395
}
396396
#endif

kernel/time/tick-sched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ static void tick_nohz_restart(struct tick_sched *ts, ktime_t now)
642642

643643
static inline bool local_timer_softirq_pending(void)
644644
{
645-
return local_softirq_pending() & TIMER_SOFTIRQ;
645+
return local_softirq_pending() & BIT(TIMER_SOFTIRQ);
646646
}
647647

648648
static ktime_t tick_nohz_next_event(struct tick_sched *ts, int cpu)

0 commit comments

Comments
 (0)