public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: xuyang2018.jy@fujitsu.com <xuyang2018.jy@fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] lib/tst_hugepage: Fix .request_hugepages = 0 bug
Date: Mon, 26 Jul 2021 05:15:06 +0000	[thread overview]
Message-ID: <60FE44F9.3080404@fujitsu.com> (raw)
In-Reply-To: <YPrZhzFng/7nHywg@yuki>

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.
>

  reply	other threads:[~2021-07-26  5:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23  5:19 [LTP] [PATCH 1/2] lib/tst_hugepage: Fix .request_hugepages = 0 bug Yang Xu
2021-07-23  5:19 ` [LTP] [PATCH 2/2] syscalls/shmget02: Use TST_NO_HUGEPAGES instead of 0 Yang Xu
2021-07-23 15:01   ` Cyril Hrubis
2021-07-23 15:00 ` [LTP] [PATCH 1/2] lib/tst_hugepage: Fix .request_hugepages = 0 bug Cyril Hrubis
2021-07-26  5:15   ` xuyang2018.jy [this message]
2021-07-26  5:54   ` Petr Vorel
2021-07-26  5:58     ` xuyang2018.jy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=60FE44F9.3080404@fujitsu.com \
    --to=xuyang2018.jy@fujitsu.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox