[LTP] [PATCH 1/2] lib/tst_hugepage: Fix .request_hugepages = 0 bug

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Mon Jul 26 07:15:06 CEST 2021


Hi Cyril
> Hi!
>> +'tst_hugepages' will be set to 0. If need zero hugepage on supported hugetlb
>                                        ^
> 				      If the hugepage size needs to be
> 				      set to 0 on ...
>> +system, please use '.request_hugepages = TST_NO_HUGEPAGES'.
I use number instead of size and then push this patchset.
Thanks for your review.

Best Regards
Yang Xu
>>
>>   Also, we do cleanup and restore work for the hpages resetting automatically.
>>
>> diff --git a/include/tst_test.h b/include/tst_test.h
>> index c7d77eb09..40c725995 100644
>> --- a/include/tst_test.h
>> +++ b/include/tst_test.h
>> @@ -125,6 +125,8 @@ struct tst_tag {
>>
>>   extern unsigned int tst_variant;
>>
>> +#define TST_NO_HUGEPAGES ((unsigned long)-1)
>> +
>>   struct tst_test {
>>   	/* number of tests available in test() function */
>>   	unsigned int tcnt;
>> @@ -175,7 +177,8 @@ struct tst_test {
>>   	 * have enough hpage for using, it will try the best to reserve 80% available
>>   	 * number of hpages. With success test stores the reserved hugepage number in
>>   	 * 'tst_hugepages. For the system without hugetlb supporting, variable
>> -	 * 'tst_hugepages' will be set to 0.
>> +	 * 'tst_hugepages' will be set to 0. If need zero hugepage on supported hugetlb
>> +	 * system, please use '.request_hugepages = TST_NO_HUGEPAGES'.
>
> Here as well.
>
>
> Other than that it looks good.
>


More information about the ltp mailing list