Re: [PATCH] Runtime PM: Adding explicit check to make sure dev->parent supports runtime PM before accessing its PM fields.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 4 Dec 2009, Mahalingam, Nithish wrote:

> The below patch makes sure that dev->parent supports runtime PM before accessing its PM fields. Though the code does this check at a later point in time, doing it earlier can optimize the code flow.

This is not a good idea.  Those fields should be set correctly even if 
the parent's disable_depth is positive.  What would happen if the 
fields were wrong and then somebody called pm_runtime_enable(parent)?

Whether this change optimizes the code flow is not entirely clear.  
Sure, it speeds things up a little in the case where the parent is
disabled.  But it also slows things down in the case where the parent
is enabled.

Alan Stern

_______________________________________________
linux-pm mailing list
linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

[Index of Archives]     [Linux ACPI]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [CPU Freq]     [Kernel Newbies]     [Fedora Kernel]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux