Re: [PATCH v6-resubmit of 2/4] PM: Introduce DEVFREQ: generic DVFS framework with device-specific OPPs

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

 



On Tue, Aug 23, 2011 at 1:08 PM, MyungJoo Ham <myungjoo.ham@xxxxxxxxxxx> wrote:
> On Tue, Aug 23, 2011 at 3:19 AM, Turquette, Mike <mturquette@xxxxxx> wrote:
>> On Fri, Aug 19, 2011 at 1:30 AM, MyungJoo Ham <myungjoo.ham@xxxxxxxxxxx> wrote:
>>> +
>>> +       if (jiffies_passed == 0)
>>> +               jiffies_passed = 1;
>>> +       if (jiffies_passed < 0) /* "Infinite Timeout" */
>>> +               jiffies_passed = INT_MAX;
>>
>> This doesn't account for jiffies rollover (~49 days on architectures
>> with HZ == 1000).  At rollover-time some devices might incorrectly get
>> marked as having an infinite timeout.
>
> Yes, that is to be removed and jiffies_passed appears to be better
> being unsigned long, not int.
>
>>
>>> +
>>> +       mutex_lock(&devfreq_list_lock);
>>> +
>>> +       list_for_each_entry_safe(devfreq, tmp, &devfreq_list, node) {
>>> +               /* Reflect the changes in profile->polling_ms */
>>> +               if (devfreq->polling_ms != devfreq->profile->polling_ms) {
>>> +                       devfreq->polling_ms = devfreq->profile->polling_ms;
>>> +                       devfreq->polling_jiffies = msecs_to_jiffies(
>>> +                                       devfreq->polling_ms);
>>
>> Does struct devfreq need ->polling_ms?  It seems like useless storage
>> since we're really interested in ->polling_jiffies.
>>
>> How about removing devfreq->polling_ms and then just doing the
>> conversion whenever the sysfs file is written to?
>
> It we assume that profile->polling_ms is never changed by either the
> driver or the governor, we can remove it in devfreq.
> It was added to struct devfreq in order to see if the value has been
> changed and get polling_jiffies updated accordingly.
> Although there is no "store" function for polling_ms in sysfs, the
> drivers and governors are able to update the value at any time.

Plase never mind this paragraph. I'll remove that devfre->polling_ms
and make an sysfs entry to update polling_ms properly with soon-to-be
release v7 patchset. It looks more beautiful that way to me either.

>
>>
>> Regards,
>> Mike
>>
>
> I'll send "v7" patch with some minor updates soon. It appears that
> devfreq.polling_ms would be better unsigned along with jiffies_passed.
>
> Thanks
>
> MyungJoo
>
> --
> MyungJoo Ham (함명주), Ph.D.
> Mobile Software Platform Lab,
> Digital Media and Communications (DMC) Business
> Samsung Electronics
> cell: 82-10-6714-2858
>



-- 
MyungJoo Ham (함명주), Ph.D.
Mobile Software Platform Lab,
Digital Media and Communications (DMC) Business
Samsung Electronics
cell: 82-10-6714-2858
_______________________________________________
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