Re: [LTP] [PATCH 2/2] mm/lib: increase sleep time in ksm scanning

Caspar Zhang
2012-07-09T12:37:36Z

On 07/09/2012 07:32 PM, Wanlong Gao wrote:
> On 07/09/2012 05:51 PM, Caspar Zhang wrote:
>>
>> for some systems under pressure, we've observed that sleeping 5 seconds
>> is not sufficient for completing ksm scanning, to fix this, we should
>> give ksmd more time to scan the mergable pages by increasing sleeping
>> time to 10s.
>
> If 5s is not enough, isn't we waiting here already?

Sorry, I'm not catching you... :-( the problem currently we encounter is
that if 5s given, all ksm values (pages_sharing, pages_shared, etc)
might remain the same between before and after sleeping, so the
wait_ksmd function could exit. But in fact the kernel could be busy
under pressure and it just needs more than 5s to merge the same page.
Using 10s as polling interval can make sure if ksm values remains the
same between each loop, it should indicates that ksmd has done scanning
correctly.

Thanks,
Caspar