Linux Test Project
 help / color / mirror / Atom feed
From: Wake Liu via ltp <ltp@lists.linux.it>
To: Avinesh Kumar <avinesh.kumar@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement
Date: Thu, 19 Nov 2026 13:48:25 +0000	[thread overview]
Message-ID: <20261119134825.294248-1-wakel@google.com> (raw)
In-Reply-To: <CAGp7zX6g1F04g50OcY9L9JVt0jH7NdtcSPtNXjtYSCs98=y2fA@mail.gmail.com>

Hi Avinesh,

On Thu, Nov 19, 2026 at 02:01:21PM +0100, Avinesh Kumar wrote:
> Unfortunately this change breaks things on tmpfs on systems with 64k
> pagesize, as library sets
>         if (!tst_test->dev_min_size)
>                 tmpfs_size = 32;
...
> so either we need to revert this patch or we can do this lib change
>
> (lib/tst_test.c)
>
> -       if (!tst_test->dev_min_size)
> -               tmpfs_size = 32;
> -       else
> +       if (!tst_test->dev_min_size) {
> +               /*
> +                * tmpfs charges its size in whole pages, so 32MB is only 512
> +                * pages with 64kB pages instead of 8192 with 4kB ones. Scale
> +                * it to keep the same page budget on every architecture.
> +                */
> +               tmpfs_size = 32 * MAX(getpagesize() / 4096, 1);
> +       } else {
>                  tmpfs_size = tdev.size;
> +       }

Thanks for catching this!

I agree with updating limit_tmpfs_mount_size() in lib/tst_test.c rather
than reverting. Reverting to .dev_min_size = 512 would bring back loop
backing file ENOSPC failures on storage-constrained systems (and even
.dev_min_size = 300 would only provide 4800 pages with 64kB pages, still
short of the 5460 non-empty files created at peak in inode01).

Scaling the default 32MB tmpfs limit by getpagesize() / 4096 keeps a
consistent 8192-page budget across 4kB (32MB), 16kB (128MB, which also
matters for 16kB-page Android kernels), and 64kB (512MB) systems while
preserving the 2x MemAvailable TCONF guard for low-memory machines.

Since the fix and comment are yours, will you be sending this as a
formal patch? Feel free to add my:

Reviewed-by: Wake Liu <wakel@google.com>

(Or let me know if you prefer that I send it out with your
Suggested-by.)

Thanks,
Wake

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2026-11-19 13:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 12:56 [LTP] [PATCH] inode01: Drop redundant 512MB dev_min_size requirement Wake Liu via ltp
2026-11-18  9:44 ` Avinesh Kumar via ltp
2026-11-18 10:19 ` Cyril Hrubis
2026-11-19 13:01 ` Avinesh Kumar via ltp
2026-11-19 13:48   ` Wake Liu 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=20261119134825.294248-1-wakel@google.com \
    --to=ltp@lists.linux.it \
    --cc=avinesh.kumar@suse.com \
    --cc=wakel@google.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