Re: [PATCH 3/4] cpuidle: move enter_dead to the driver structure

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

 



On Friday, July 06, 2012, Daniel Lezcano wrote:
> On 07/05/2012 10:40 PM, Rafael J. Wysocki wrote:
> > On Thursday, July 05, 2012, Daniel Lezcano wrote:
> >> The 'enter_dead' function is only used for processor_idle.c
> >> and the same function is used several times. We fall into the
> >> same abuse with the multiple callbacks for the same function.
> > 
> > This isn't abuse, mind you.  This is a normal practice.
> 
> Well, that depends :)
> 
> I agree adding a callback per state is nice and flexible

Yes, it is.

> but if it is not used, it is a waste of memory, even if it is 32 bytes.

32 bits, perhaps?  And how many of those are there in the whole system,
actually?  Is this a number that actually matters?

> >> This patch fixes that by moving the 'enter_dead' function to the
> >> driver structure. A flag CPUIDLE_FLAG_DEAD_VALID has been added
> >> to handle the callback conditional invokation.
> > 
> > And how does that improve things?
> 
> In order to check if the play_dead is enabled for a specific state, we
> check if the pointer is set. As it has been moved to a single function,
> we need to add a flag to replace this check. That is not an improvement,

Well, exactly.

> it replace a check by another check.

Sorry, but I don't really see the point.

Thanks,
Rafael


[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