[LTP] [PATCH] kernel/numa: sleep 2s in test01 for waiting numastat updating

Dong ZHu bluezhudong@gmail.com
Tue May 31 03:08:10 CEST 2016


On Mon, May 30, 2016 at 7:55 PM, Cyril Hrubis <chrubis@suse.cz> wrote:
> Hi!
>> Without this patch always get the below error with kernel 4.6.0:
>> "ltpapicmd.c:193: Test #1: NUMA hit and localnode increase in node0 is
>> less than expected"
>>
>> numastat's "local_node" might take some to update even though we malloc
>> the local memory for each node.
>>
>> So this patch in targets to sleep for 2 seconds until "local_node" get
>> updated.
>
> I've seen this failure as well and also the test 3, test 5 and test 6
> two of them have sleep 2s already, hence adding sleep 2 is not good
> enough it only makes the race condition less probable.

I didn't see this failure in test 3, test 4 and test 6.

When I add sleep 2 seconds test 1 work properly.

>
> What we should do instead is to get the new stastistic in loop with a
> short (~0.1s) sleep util we get the expected value or until timeout has
> been reached (~10s). And this should be done ideally as a function
> called from each of the numa tests.
>

I think we should not wait for 10s, it is a bit longer, the test will
pass no matter we
add "numactl --cpunodebind=$node --membind=$node support_numa
$ALLOC_1MB" or not.

I suppose maybe we could refine the support_numa  to make it allocate
a bigger memory and run
for a while rather than return immediately.

-- 
Best Regards,
Dong Zhu

My Site: http://bluezd.info


More information about the ltp mailing list