I think the main trade-off is not micro-optimizations, but rather between code that just does what needs to be done and code that maintains data structures that will inform other code as to what state things are in. The old driver code, for example, set up the device, performed whatever operation was requested, and kept a small amount of state about it; it requested an interrupt from the device, and handled the interrupt when it came. The new code tracks the power management state of the device, what operations are pending that would prevent powering it off, what other hardware needs to be kept turned on to access the device, and so forth. It's a lot of bloat in the form of data that has to be stored and updated; it's also necessary to have any chance of having power management work.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds