lkml.org 
[lkml]   [2012]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC][PATCH 5/8] PM / Sleep: Change wakeup statistics
Date
On Wednesday, February 15, 2012, Arve Hjønnevåg wrote:
> On Mon, Feb 6, 2012 at 5:05 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > Wakeup statistics used by Android are slightly different from what we
> > have at the moment, so modify them to follow Android more closely.
> ...
> > @@ -438,6 +444,11 @@ static void wakeup_source_deactivate(str
> > if (ktime_to_ns(duration) > ktime_to_ns(ws->max_time))
> > ws->max_time = duration;
> >
> > + ws->last_time = now;
> > + if (ws->has_timeout && time_after(jiffies, ws->timer_expires))
>
> time_after_eq may work better (or increment the count from the timer).

I think incrementing the count from the timer is a better approach.

> I applied this patch and the expire counts I see for wakeup-sources
> that always time-out do not match the active count.

I see. The reason may also be that __pm_wakeup_event() increments
ws->event_count even if the wakeup source is already active.

Thanks,
Rafael
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-02-15 23:35    [W:0.672 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site