LWN.net Logo

The PowerClamp driver

The PowerClamp driver

Posted Dec 6, 2012 11:00 UTC (Thu) by ras (subscriber, #33059)
Parent article: The PowerClamp driver

> The kernel's power management subsystem has become increasingly effective over recent years, to the point that our CPU power management is said to be second to none.

OK, now I am confused.

I always put MacBook's phenomenal battery life to excellent software power management, and by implication the Linux ecosystem had a bit of catching up to do. Admittedly this based purely on observation that MacBook's are nearly identical. For example the MacBook pro's battery capacity is approx 210kJ, a Dell is 180kJ. The other components - CPU, graphics card, memory, disk drive are all the same. Yet the Mac will last 10 hours, and the Dell 4.

Can someone with a clue tell me what is really going on?


(Log in to post comments)

The PowerClamp driver

Posted Dec 6, 2012 11:49 UTC (Thu) by hummassa (subscriber, #307) [Link]

My MacBook also has a considerably long battery life *as long as I don't do anything funny with it* (like transcoding movies or compiling a large piece of software like gcc...)

The PowerClamp driver

Posted Dec 6, 2012 13:56 UTC (Thu) by Jonno (subscriber, #49613) [Link]

> Can someone with a clue tell me what is really going on?
Linux kernel CPU power management currently beats all other, but the CPU isn't the only thing drawing power. GPU, PCIe, and HDD power management are all areas where Linux could do significantly better. And Linux userspace is typically less power management aware than that of MacOS X, resulting in the Mac simply doing less work while on battery...

The PowerClamp driver

Posted Dec 7, 2012 1:59 UTC (Fri) by idupree (subscriber, #71169) [Link]

Yeah, alas. I'd hoped it was a "[mechanism] to put an overall limit on the amount of power consumed" but it isn't. I was looking at certain external batteries[*] for travel which have a maximum output rating of 4.2A. My laptop (at 19V DC input) is capable of using more than 4.2A (80 W). The power brick it came with has max 6.32A; from my measurements with some of CPU/GPU/screen at full force, this higher capacity is sometimes necessary. If my system tried to draw more power at any moment, bad things might happen (I'm not sure how bad. Battery damage? Laptop shutdown?). I wouldn't buy that battery without a way to ensure the laptop's total power usage was below the limit -- which is a hard problem which this article does not appear to go anywhere near solving.

[*] http://zikko-store.com/product_view.php?id=7

The PowerClamp driver

Posted Dec 12, 2012 16:40 UTC (Wed) by arjan (subscriber, #36785) [Link]

powerclamp is a building block towards a solution that you describe.
Note that if you need a "near instant" limit, a kernel level solution isn't going to work, you need something much much faster responding.
But if you can deal with "we need over <some hundreds of milliseconds> the average to be below X", and you can measure X.. this driver is what a small (userspace) control agent can use to actually impact the current consumption

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds