Re: [PATCH 1/2] sched/wait: Break up long wake list walk

From: Tim Chen
Date: Wed Aug 23 2017 - 11:59:14 EST


On 08/23/2017 07:49 AM, Liang, Kan wrote:
>> On Tue, Aug 22, 2017 at 12:55 PM, Liang, Kan <kan.liang@xxxxxxxxx> wrote:
>>>
>>>> So I propose testing the attached trivial patch.
>>>
>>> It doesnât work.
>>> The call stack is the same.
>>
>> So I would have expected the stack trace to be the same, and I would even
>> expect the CPU usage to be fairly similar, because you'd see repeating from
>> the callers (taking the fault again if the page is - once again - being migrated).
>>
>> But I was hoping that the wait queues would be shorter because the loop for
>> the retry would be bigger.
>>
>> Oh well.
>>
>> I'm slightly out of ideas. Apparently the yield() worked ok (apart from not
>> catching all cases), and maybe we could do a version that waits on the page
>> bit in the non-contended case, but yields under contention?
>>
>> IOW, maybe this is the best we can do for now? Introducing that
>> "wait_on_page_migration()" helper might allow us to tweak this a bit as
>> people come up with better ideas..
>
> The "wait_on_page_migration()" helper works well in the overnight testing.
>


Linus,

Will you still consider the original patch as a fail safe mechanism?

Thanks.

Tim