[lkml]   [2017]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH v2 7/7] sched/idle: update poll time when wakeup from idle
On 2017/8/29 20:46, Peter Zijlstra wrote:
> On Tue, Aug 29, 2017 at 11:46:41AM +0000, Yang Zhang wrote:
>> In ttwu_do_wakeup, it will update avg_idle when wakeup from idle. Here
>> we just reuse this logic to update the poll time. It may be a little
>> late to update the poll in ttwu_do_wakeup, but the test result shows no
>> obvious performance gap compare with updating poll in irq handler.
>> one problem is that idle_stamp only used when using CFS scheduler. But
>> it is ok since it is the default policy for scheduler and only consider
>> it should enough.
>> Signed-off-by: Yang Zhang <>
>> Signed-off-by: Quan Xu <>
> Same broken SoB chain, and not a useful word on why you need to adjust
> this crap to begin with. What you want that poll duration to be related
> to is the cost of a VMEXIT/VMENTER cycle, not however long we happened
> to be idle.

Actually, we should compare the cost of VMEXIT/VMENTER with the real
duration in idle. We have a rough number of the cost for one
VMEXIT/VMENTER(it is about 2k~4k cycles depends on the underlying CPU)
and it introduces 4~5 VMENTER/VMEXITs in idle path which may increase
about 7us latency in average. So we set the poll duration to 10us by

Another problem is there is no good way to measure the duration in idle.
avg_idle is the only way i find so far. Do you have any suggestion to do
it better? Thanks.

Alibaba Cloud Computing

 \ /
  Last update: 2017-09-01 09:33    [W:0.047 / U:15.196 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site