* Re: Re: [RFC PATCH] suspend/resume performance improvement
@ 2015-05-27 1:32 EunTaik Lee
0 siblings, 0 replies; 3+ messages in thread
From: EunTaik Lee @ 2015-05-27 1:32 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: pavel@ucw.cz, len.brown@intel.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
>> When a task that calls state_store() to suspend
>> the device has used up most of its time slice,
>> suspend sometimes take too long. (User noticeable)
>>
>> Suspend/resume is a system wide operation.
>> So, instead of depending on a userspace task's time
>> slice, let kworker do the work to avoid a long wait
>> on the runqueue.
> All of that seems to duplicate the existing autosleep.c functionality.
Yes, the effect of using the kworker in autosleep will be same performance-wise.
But if a platform doesn't use the autosleep functionality then we still have the problem.
So doesn't it make sense to implement it for the autosleep-disabled use cases?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [RFC PATCH] suspend/resume performance improvement
@ 2015-05-27 1:41 EunTaik Lee
0 siblings, 0 replies; 3+ messages in thread
From: EunTaik Lee @ 2015-05-27 1:41 UTC (permalink / raw)
To: Pandruvada, Srinivas
Cc: Brown, Len, linux-kernel@vger.kernel.org, pavel@ucw.cz,
linux-pm@vger.kernel.org, rjw@rjwysocki.net
> Instead of replicating code in state_store here, does it make sense to
> move into a common part, so that fixes/optimization can be done in one
> place?
> Also why another config? If this has proven benefit then it can be
> default path.
I agree. I will resend the patch if this patch is agreed to be useful.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Re: [RFC PATCH] suspend/resume performance improvement
@ 2015-05-27 10:38 EunTaik Lee
0 siblings, 0 replies; 3+ messages in thread
From: EunTaik Lee @ 2015-05-27 10:38 UTC (permalink / raw)
To: Pavel Machek
Cc: rjw@rjwysocki.net, len.brown@intel.com, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
On Tue 2015-05-27 16:50 (GMT+09:00), Pavel Machek wrote:
>> So, instead of depending on a userspace task's time
>> slice, let kworker do the work to avoid a long wait
>> on the runqueue.
>
>...so if you really want high priority for that operation, just renice
>yourself to higher priority or something...
The problem occured on Android L version. KK had autosuspend enabled
but it was disabled in L to allow userspace to collect stats.
The delay was inside try_to_freeze_tasks function (at system_server thread of system_server process).
system_server got preempted after unlocking the tasklist_lock.
46 while (true) {
47 todo = 0;
48 read_lock(&tasklist_lock);
49 for_each_process_thread(g, p) {
50 if (p == current || !freeze_task(p))
51 continue;
52
53 if (!freezer_should_skip(p))
54 todo++;
55 }
56 read_unlock(&tasklist_lock);
All of the threads of system_server process that was on the runqueue did not run during this period.
Freezing of tasks resumed after other tasks went out of the runqueue.
I have tested with the lowest nice value but the problem was still, although less, reproducible.
Best Regards,
Euntaik Lee
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-27 10:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27 10:38 Re: [RFC PATCH] suspend/resume performance improvement EunTaik Lee
-- strict thread matches above, loose matches on Subject: below --
2015-05-27 1:41 EunTaik Lee
2015-05-27 1:32 EunTaik Lee
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).