From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 1/2] lib/tst_hugepage: Fix .request_hugepages = 0 bug
Date: Fri, 23 Jul 2021 17:00:23 +0200 [thread overview]
Message-ID: <YPrZhzFng/7nHywg@yuki> (raw)
In-Reply-To: <1627017584-30405-1-git-send-email-xuyang2018.jy@fujitsu.com>
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'.
>
> 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.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2021-07-23 15:00 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 ` Cyril Hrubis [this message]
2021-07-26 5:15 ` [LTP] [PATCH 1/2] lib/tst_hugepage: Fix .request_hugepages = 0 bug xuyang2018.jy
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=YPrZhzFng/7nHywg@yuki \
--to=chrubis@suse.cz \
--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