Linux Test Project
 help / color / mirror / Atom feed
From: Li Wang <li.wang@linux.dev>
To: Wei Gao <wegao@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] madvise09: Scale cgroup memory/swap limits dynamically with page size
Date: Fri, 24 Jul 2026 17:05:15 +0800	[thread overview]
Message-ID: <amMqy0LXX7LFurPo@linux.dev> (raw)
In-Reply-To: <20260723094647.5051-1-wegao@suse.com>

Wei Gao via ltp wrote:

> +	mem_limit = 16 * PAGES * page_size;
> +	swap_limit = 2 * mem_limit;
> +

> +	if (swap_accounting_enabled && (tst_available_swap() < swap_limit / 1024)) {
> +		tst_brk(TCONF, "System needs at least %lldMB free swap to run this test",
> +			swap_limit / TST_MB);

I suspect this available swap size comparison is duplicated with
.min_swap_avail, and perhaps we can remove BASE_SWAP_LIMIT and
.min_swap_avail from the test directly.

>  static struct tst_test test = {
> @@ -291,6 +301,6 @@ static struct tst_test test = {
>  	.test_all = run,
>  	.needs_root = 1,
>  	.forks_child = 1,

> -	.min_swap_avail = SWAP_LIMIT / TST_MB,
> +	.min_swap_avail = BASE_SWAP_LIMIT / TST_MB,

-- 
Regards,
Li Wang

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

      parent reply	other threads:[~2026-07-24  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23  7:53 [LTP] [PATCH v1] madvise09: Scale cgroup memory/swap limits dynamically with page size Wei Gao via ltp
2026-07-23  8:32 ` [LTP] " linuxtestproject.agent
     [not found] ` <20260723094647.5051-1-wegao@suse.com>
2026-07-24  9:05   ` Li Wang [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=amMqy0LXX7LFurPo@linux.dev \
    --to=li.wang@linux.dev \
    --cc=ltp@lists.linux.it \
    --cc=wegao@suse.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