[LTP] [PATCH 03/10] ksm: Add max_runtime to tests

Martin Doucha mdoucha@suse.cz
Wed Aug 31 14:45:06 CEST 2022


On 30. 08. 22 16:49, Cyril Hrubis wrote:
> Hi!
>> ksm02, ksm04 and ksm05 take 10+ seconds to finish. Set max_runtime to avoid
>> random timeout issues.
> 
> I wonder if we can do better.
> 
> I guess that the actual runtime does depends on the size of the RAM
> because we wait for at least two finished full scans for ksmd. I guess
> that for large enough machines we would end up with minutes of runtime.
> 
> So I guess that it would make more sense to treat the max_runtime as a
> upper bound and set it to large enough number as we do for AIO testcases
> (30 minutes) and then make the wait_ksmd_full_scan() runtime avare so
> that it exits when the runtime is exhausted. With that we would get a
> clear message that we timed-out in the loop that waited for the ksmd
> scan.

Alternatively, we could measure 1 full ksmd scan in setup() and then set 
max_runtime dynamically. Each call of create_same_memory() would need 
roughly 16 scan times. Time spent in ksm_child_memset() is included in 
that estimate.

-- 
Martin Doucha   mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic



More information about the ltp mailing list