lkml.org 
[lkml]   [2015]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] PM / Sleep: Use workqueue for user space wakeup sources garbage collector
Date
On Wednesday, July 01, 2015 05:28:48 PM SungEun Kim wrote:
> From: "SungEun Kim" <cleaneye.kim@lge.com>
>
> The synchronous synchronize_rcu in wakeup_source_remove makes user process
> which writes to /sys/kernel/wake_unlock blocked sometimes.
>
> For example, when android eventhub tries to release wakelock,
> this blocking process can occur, and eventhub can't get input event
> for a while.
>
> Using workqueue instead of direct function call at pm_wake_unlock
> can prevent this unnecessary delay of an user space process.

The idea is defendable, but the patch is too simple.

For example, if the garbage collection is in progress, it is not useful
to start a new one.

Also the incrementation and clearing of wakelocks_gc_count should be under
the lock.


--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.


\
 
 \ /
  Last update: 2015-07-03 02:01    [W:0.089 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site