From: Andrea Cervesato via ltp <ltp@lists.linux.it>
To: Pavithra <pavrampu@linux.ibm.com>
Cc: pavrampu@linux.ibm.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] Fix hugeshmat05 test failure on lpar with 1GB hugepages.
Date: Tue, 09 Jun 2026 07:54:59 +0000 [thread overview]
Message-ID: <6a27c6d4.e3606774.7bf52.3c44@mx.google.com> (raw)
In-Reply-To: <20260420102339.729745-1-pavrampu@linux.ibm.com>
Hi Pavithra,
> + tst_res(TINFO, "Page size: %ld bytes", page_size);
> + tst_res(TINFO, "Hugepage size: %ld bytes (%ld MB)",
> + hpage_size, hpage_size / (1024 * 1024));
> }
[...]
>
> -void shm_test(int size)
> +void shm_test(long size)
> {
> int shmid;
> char *shmaddr;
> @@ -56,7 +60,7 @@ void shm_test(int size)
> }
>
> shmaddr[0] = 1;
> - tst_res(TINFO, "allocated %d huge bytes", size);
> + tst_res(TINFO, "allocated %ld huge bytes", size);
>
> if (shmdt((const void *)shmaddr) != 0) {
> shmctl(shmid, IPC_RMID, NULL);
> @@ -69,13 +73,23 @@ void shm_test(int size)
> static void test_hugeshmat(void)
> {
> unsigned int i;
> + long multiplier;
> + long tst_sizes[4];
> +
> + /*
> + * For large hugepage sizes (e.g., 1GB), use N/2 multiplier to avoid
> + * excessive memory requirements (4GB for N=4 with 1GB pages) while
> + * still testing alignment boundary conditions with multiple pages.
> + */
> + if (hpage_size >= 1024 * 1024 * 1024)
> + multiplier = N / 2;
> + else
> + multiplier = N;
>
> - const int tst_sizes[] = {
> - N * hpage_size - page_size,
> - N * hpage_size - page_size - 1,
> - hpage_size,
> - hpage_size + 1
> - };
> + tst_sizes[0] = multiplier * hpage_size - page_size;
> + tst_sizes[1] = multiplier * hpage_size - page_size - 1;
> + tst_sizes[2] = hpage_size;
> + tst_sizes[3] = hpage_size + 1;
>
Are you still working on this patch? If yes, please update it according
to the agent review, before sending a v2. Also, in LTP we have TST_KB,
TST_MB, TST_GB, so you can avoid using `1024 * 1024 ..` format.
Please rebase to master and send a new version, I will move this patch
into Changes Requested before proceeding to the proper review.
Regards,
--
Andrea Cervesato
SUSE QE Automation Engineer Linux
andrea.cervesato@suse.com
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2026-06-09 7:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 10:23 [LTP] [PATCH] Fix hugeshmat05 test failure on lpar with 1GB hugepages Pavithra
2026-04-20 10:53 ` [LTP] " linuxtestproject.agent
2026-06-09 7:54 ` Andrea Cervesato via ltp [this message]
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=6a27c6d4.e3606774.7bf52.3c44@mx.google.com \
--to=ltp@lists.linux.it \
--cc=andrea.cervesato@suse.com \
--cc=pavrampu@linux.ibm.com \
/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