sony-vaio-z-series team mailing list archive
-
sony-vaio-z-series team
-
Mailing list archive
-
Message #01606
Re: battery life (disable nvidia card)
On Do, 30 Sep 2010, K. Posern wrote:
> Could you be so kind to send me your linux kernel config? (maybe just
> from /proc/config.gz)?
Attached.
> Or shed some light on /how/ you achieve this?
Decent distribution that activates laptop mode, sends hd to sleep,
then turn off bluetooth, ...
> It is probably obvious, but I wasn't able to find it: What patch(es) are
> you referring to?
If oyu have accessive occurrences of
34.2% (185.3) [kernel scheduler] Load balancing tick
23.9% (129.6) [extra timer interrupt]
in the output of powertop, then try the attached patch.
(otherwise no need)
Then it is also a question of display size I assume, mine is Z11
the mini screen!
Best wishes
Norbert
------------------------------------------------------------------------
Norbert Preining preining@{jaist.ac.jp, logic.at, debian.org}
JAIST, Japan TeX Live & Debian Developer
DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
------------------------------------------------------------------------
FINUGE (vb.)
In any division of foodstuffs equally between several people, to give
yourself the extra slice left over.
--- Douglas Adams, The Meaning of Liff
> and it seems that still works nicely. I am now running on battery power,
> connected to the internet over bluetooth to my mobile, and get:
> Wakeups-from-idle per second : 452.2 interval: 10.0s
> Power usage (ACPI estimate): 12.4W (3.6 hours) (long term: 8.0W,/5.6h)
>
> Top causes for wakeups:
> 16.1% ( 79.5) [yenta, ehci_hcd:usb2, uhci_hcd:usb6, uhci_hcd:usb7, uhci_hcd:
> 14.3% ( 70.7) [kernel scheduler] Load balancing tick
> 14.1% ( 69.8) [extra timer interrupt]
> 13.1% ( 64.9) kworker/0:0
> 10.7% ( 53.0) USB device 8-2 : BCM2046 Bluetooth Device (Broadcom Corp)
> 8.4% ( 41.8) [kernel core] hrtimer_start (tick_sched_timer)
> 3.8% ( 19.0) gnome-terminal
> 2.9% ( 14.6) icedove-bin
> 2.2% ( 10.7) PS/2 keyboard/mouse/touchpad interrupt
>
> Which shows that the "Load balancing tick" and "extra timer interrupt" are
> down to halfway normal levels. I guess when I shutdown the usb/bluetooth
> connection both of them will drop even further.
> Hope you can do something with it!
>
> Let me know if I should do more testing.
>
Seems in .36 kernel the extra timer reduced. Guess the following patch
worked. http://lkml.org/lkml/2010/6/9/109
Tim,Yakui and I talked with the issue. We thought the nohz_ratelimit()
only hart the power when lots of interrupts with light load in system.
Since the tick_nohz_stop_sched_tick() only be checked in cpu_idle() and
in irq_exit(), we remove the nohz checking in irq_exit(). The TCP/UDP RR
loop back testing of netperf also benefit from this. But it have no
effect on real network testing.
Could you like to try the following patch on your system and see how
many power it consumption now?
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 1e2a6db..a4dbb37 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -274,8 +274,13 @@ extern cpumask_var_t nohz_cpu_mask;
#if defined(CONFIG_SMP) && defined(CONFIG_NO_HZ)
extern void select_nohz_load_balancer(int stop_tick);
extern int get_nohz_timer_target(void);
+extern int nohz_ratelimit(int cpu);
#else
static inline void select_nohz_load_balancer(int stop_tick) { }
+static inline int nohz_ratelimit(int cpu)
+{
+ return 0;
+}
#endif
/*
diff --git a/kernel/sched.c b/kernel/sched.c
index dc85ceb..132a21c 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -1182,6 +1182,16 @@ static void resched_task(struct task_struct *p)
smp_send_reschedule(cpu);
}
+int nohz_ratelimit(int cpu)
+{
+ struct rq *rq = cpu_rq(cpu);
+ u64 diff = rq->clock - rq->nohz_stamp;
+
+ rq->nohz_stamp = rq->clock;
+
+ return diff < (NSEC_PER_SEC / HZ) >> 1;
+}
+
static void resched_cpu(int cpu)
{
struct rq *rq = cpu_rq(cpu);
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 3e216e0..0b5b186 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -325,7 +325,7 @@ void tick_nohz_stop_sched_tick(int inidle)
} while (read_seqretry(&xtime_lock, seq));
if (rcu_needs_cpu(cpu) || printk_needs_cpu(cpu) ||
- arch_needs_cpu(cpu)) {
+ arch_needs_cpu(cpu)|| (inidle && nohz_ratelimit(cpu))) {
next_jiffies = last_jiffies + 1;
delta_jiffies = 1;
} else {
References