Re: Slow pty's (was Re: libdivecomputer interfaces?)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mike Galbraith
Date: Wednesday, June 16, 2010 - 11:39 pm

On Wed, 2010-06-16 at 17:16 +0200, Mike Galbraith wrote:

(Removing filth and re-seating ram seems to have revived poor old P4)

I'm not seeing any problem with serial console here, seems to work just
fine P4->Q6600, both running NOHZ kernels with nohz_ratelimit(), 33.5 on
the P4, and tip.today on the Q6600.

Eyeballing it, perhaps we need to proceed downward if any needs_cpu
condition is true, despite having just been here a wee bit ago.

Does this help anyone's woes?

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 5f171f0..ec72fad 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -262,7 +262,7 @@ void tick_nohz_stop_sched_tick(int inidle)
 	ktime_t last_update, expires, now;
 	struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev;
 	u64 time_delta;
-	int cpu;
+	int cpu, cpu_needed;
 
 	local_irq_save(flags);
 
@@ -315,7 +315,9 @@ void tick_nohz_stop_sched_tick(int inidle)
 		goto end;
 	}
 
-	if (nohz_ratelimit(cpu))
+	cpu_needed = rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) || arch_needs_cpu(cpu);
+
+	if (!cpu_needed && nohz_ratelimit(cpu))
 		goto end;
 
 	ts->idle_calls++;
@@ -327,8 +329,7 @@ void tick_nohz_stop_sched_tick(int inidle)
 		time_delta = timekeeping_max_deferment();
 	} while (read_seqretry(&xtime_lock, seq));
 
-	if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) ||
-	    arch_needs_cpu(cpu)) {
+	if (cpu_needed) {
 		next_jiffies = last_jiffies + 1;
 		delta_jiffies = 1;
 	} else {


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Slow pty's (was Re: libdivecomputer interfaces?), Linus Torvalds, (Thu Jun 10, 10:25 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), OGAWA Hirofumi, (Thu Jun 10, 11:07 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Chris Wedgwood, (Thu Jun 10, 11:10 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Brian Bloniarz, (Thu Jun 10, 3:25 pm)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Linus Torvalds, (Thu Jun 10, 3:30 pm)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Jiri Kosina, (Wed Jun 16, 8:03 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Mike Galbraith, (Wed Jun 16, 8:16 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Mike Galbraith, (Wed Jun 16, 11:39 pm)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Mike Galbraith, (Thu Jun 17, 12:00 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Mike Galbraith, (Thu Jun 17, 3:50 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Peter Zijlstra, (Thu Jun 17, 6:24 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Thomas Gleixner, (Thu Jun 17, 7:11 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Mike Galbraith, (Thu Jun 17, 7:14 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Brian Bloniarz, (Thu Jun 17, 7:56 am)
[PATCH] nohz: Fix nohz ratelimit, Peter Zijlstra, (Thu Jun 17, 9:02 am)
[tip:timers/urgent] nohz: Fix nohz ratelimit, tip-bot for Peter Zi ..., (Thu Jun 17, 10:39 am)
Re: Slow pty's (was Re: libdivecomputer interfaces?), Jef Driesen, (Fri Nov 12, 11:45 am)