diff options
author | Buddy Liong <a0270631@ti.com> | 2018-03-23 17:03:38 -0500 |
---|---|---|
committer | Buddy Liong <a0270631@ti.com> | 2018-03-23 17:04:02 -0500 |
commit | 03cce97d4f914d4b8bc071df6eedc4a0f510ffab (patch) | |
tree | e7f0c6d8aae5b4b81501c1c66e84b548bc38036f /kernel/time/tick-sched.c | |
parent | b43fa3b965b034a7e390989a6294b597e188fb62 (diff) | |
parent | eb496200efeb6c580f386523062b0ccc80325315 (diff) | |
download | jacinto6evm-03cce97d4f914d4b8bc071df6eedc4a0f510ffab.tar.gz |
Merge branch 'p-ti-android-linux-4.4.y' of git://git.omapzoom.org/kernel/omap into 6AO.1.06AO.1.0
* 'p-ti-android-linux-4.4.y' of git://git.omapzoom.org/kernel/omap: (752 commits)
ARM: dts: dra76-evm: Add wilink8 wlan support
ARM: dts: dra7-evm: move MMC4 description to common file
usb: otg: Fix crash on shutdown
ARM: DTS: DRA76-EVM: Set powerhold property for tps65917
ti_config_fragments: android_omap: enable MCAN
Linux 4.4.117
media: r820t: fix r820t_write_reg for KASAN
ARM: dts: s5pv210: add interrupt-parent for ohci
ARM: pxa/tosa-bt: add MODULE_LICENSE tag
vfs: don't do RCU lookup of empty pathnames
x86: fix build warnign with 32-bit PAE
dm: correctly handle chained bios in dec_pending()
mvpp2: fix multicast address filter
ALSA: seq: Fix racy pool initializations
ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204
ALSA: hda/realtek: PCI quirk for Fujitsu U7x7
ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute
ALSA: hda - Fix headset mic detection problem for two Dell machines
Btrfs: fix unexpected -EEXIST when creating new inode
Btrfs: fix crash due to not cleaning up tree log block's dirty bits
...
Signed-off-by: Buddy Liong <a0270631@ti.com>
Diffstat (limited to 'kernel/time/tick-sched.c')
-rw-r--r-- | kernel/time/tick-sched.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index 34f9a9c417d9..a935cbdc55a4 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c @@ -568,6 +568,11 @@ static void tick_nohz_restart(struct tick_sched *ts, ktime_t now) tick_program_event(hrtimer_get_expires(&ts->sched_timer), 1); } +static inline bool local_timer_softirq_pending(void) +{ + return local_softirq_pending() & TIMER_SOFTIRQ; +} + static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts, ktime_t now, int cpu) { @@ -584,8 +589,18 @@ static ktime_t tick_nohz_stop_sched_tick(struct tick_sched *ts, } while (read_seqretry(&jiffies_lock, seq)); ts->last_jiffies = basejiff; - if (rcu_needs_cpu(basemono, &next_rcu) || - arch_needs_cpu() || irq_work_needs_cpu()) { + /* + * Keep the periodic tick, when RCU, architecture or irq_work + * requests it. + * Aside of that check whether the local timer softirq is + * pending. If so its a bad idea to call get_next_timer_interrupt() + * because there is an already expired timer, so it will request + * immeditate expiry, which rearms the hardware timer with a + * minimal delta which brings us back to this place + * immediately. Lather, rinse and repeat... + */ + if (rcu_needs_cpu(basemono, &next_rcu) || arch_needs_cpu() || + irq_work_needs_cpu() || local_timer_softirq_pending()) { next_tick = basemono + TICK_NSEC; } else { /* |