From: Petr Vorel <pvorel@suse.cz>
To: Richard Palethorpe <rpalethorpe@suse.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] memcg: Account for pages in the per-cpu cache
Date: Thu, 5 Oct 2023 11:00:34 +0200 [thread overview]
Message-ID: <20231005090034.GA102472@pevik> (raw)
In-Reply-To: <20231004121149.30849-1-rpalethorpe@suse.com>
Hi Richie,
[ Cc Li ]
> PAGESIZES is one greater than the batch size for charging pages from
> the per CPU cache. So with MEM_TO_ALLOC=2*PAGESIZES we have two pages
> that are below the threshold for being charged.
> Sometimes something triggers a flush and the pages get charged to the
> global counter anyway and the test passes. We have seen cases where
> the test times out waiting for this to happen.
> So this patch sets a lower bound to allow those cases to pass. It'll
> probably speed the test up as well.
LGTM.
Reviewed-by: Petr Vorel <pvorel@suse.cz>
Kind regards,
Petr
> Signed-off-by: Richard Palethorpe <rpalethorpe@suse.com>
> ---
> .../controllers/memcg/functional/memcg_subgroup_charge.sh | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> diff --git a/testcases/kernel/controllers/memcg/functional/memcg_subgroup_charge.sh b/testcases/kernel/controllers/memcg/functional/memcg_subgroup_charge.sh
> index 9bcc01258..3b7311422 100755
> --- a/testcases/kernel/controllers/memcg/functional/memcg_subgroup_charge.sh
> +++ b/testcases/kernel/controllers/memcg/functional/memcg_subgroup_charge.sh
> @@ -33,8 +33,8 @@ test_subgroup()
> fi
> echo $MEMCG_PROCESS_PID > tasks
> - signal_memcg_process $MEM_TO_ALLOC
> - check_mem_stat "rss" $MEM_TO_ALLOC
> + signal_memcg_process $MIN_CHARGED
> + check_mem_stat "rss" $MIN_CHARGED $MEM_TO_ALLOC
> cd subgroup
> echo $MEMCG_PROCESS_PID > tasks
> @@ -66,5 +66,6 @@ test3()
> # Allocate memory bigger than per-cpu kernel memory
> MEM_TO_ALLOC=$((PAGESIZES * 2))
> +MIN_CHARGED=$((2 * (PAGESIZES - 1)))
> tst_run
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2023-10-05 9:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 12:11 [LTP] [PATCH] memcg: Account for pages in the per-cpu cache Richard Palethorpe via ltp
2023-10-05 9:00 ` Petr Vorel [this message]
2023-10-12 9:09 ` Richard Palethorpe
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=20231005090034.GA102472@pevik \
--to=pvorel@suse.cz \
--cc=ltp@lists.linux.it \
--cc=rpalethorpe@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