From: Richard Palethorpe <rpalethorpe@suse.de>
To: Li Wang <liwang@redhat.com>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH 3/3] memcontrol04: Copy from kselftest
Date: Thu, 17 Feb 2022 04:35:55 +0000 [thread overview]
Message-ID: <87wnhujc06.fsf@suse.de> (raw)
In-Reply-To: <CAEemH2cdnUQ5rC5aokEyYK462bOO6bL9-vUHPWfsonaMxjHyCA@mail.gmail.com>
Hello Li,
Li Wang <liwang@redhat.com> writes:
> Hi Richard,
>
> On Mon, Feb 14, 2022 at 2:07 PM Richard Palethorpe <rpalethorpe@suse.de> wrote:
>
> Hello Li,
>
> Li Wang <liwang@redhat.com> writes:
>
> > On Thu, Feb 10, 2022 at 2:23 PM Li Wang <liwang@redhat.com> wrote:
> >
> > On Wed, Feb 9, 2022 at 7:05 PM Li Wang <liwang@redhat.com> wrote:
> >
> > Btw, there are some TFAILs from my manual run.
> > (I will look into that try to figure it out tomorrow)
> >
> > tst_test.c:1521: TINFO: Testing on ext4
> > tst_test.c:996: TINFO: Formatting /dev/loop0 with ext4 opts='' extra opts=''
> > mke2fs 1.46.5 (30-Dec-2021)
> > tst_test.c:1452: TINFO: Timeout per run is 0h 05m 00s
> > memcontrol04.c:118: TINFO: Child 242775 in leaf_C: Allocating pagecache: 52428800
> > memcontrol04.c:118: TINFO: Child 242776 in leaf_D: Allocating pagecache: 52428800
> > memcontrol04.c:118: TINFO: Child 242777 in leaf_F: Allocating pagecache: 52428800
> > memcontrol04.c:99: TINFO: Child 242778 in trunk_G: Allocating anon: 155189248
> > memcontrol04.c:170: TPASS: Expect: (A/B memory.current=54181888) ~= 52428800
> > memcontrol04.c:176: TPASS: Expect: (A/B/C memory.current=30957568) ~= 34603008
> > memcontrol04.c:178: TPASS: Expect: (A/B/D memory.current=22282240) ~= 17825792
> > memcontrol04.c:180: TPASS: Expect: (A/B/E memory.current=0) ~= 0
> > memcontrol04.c:99: TINFO: Child 242779 in trunk_G: Allocating anon: 174063616
> > memcontrol04.c:193: TPASS: Expect: (oom events=0) == 0
> > memcontrol04.c:196: TPASS: Expect: (low events=373) > 0
> > memcontrol04.c:193: TPASS: Expect: (oom events=0) == 0
> > memcontrol04.c:196: TPASS: Expect: (low events=373) > 0
> > memcontrol04.c:193: TPASS: Expect: (oom events=0) == 0
> > memcontrol04.c:198: TPASS: Expect: (low events=0) == 0
> > memcontrol04.c:193: TPASS: Expect: (oom events=0) == 0
> > memcontrol04.c:198: TFAIL: Expect: (low events=370) == 0
> >
> > It looks like a logic issue here, as we do alloc_pagecache 50MB
> > respectively in the leaf_cg[C, D, E, F] and only the 'memory.low'
> >
> > My apologies, the leaf_cg[E] does not have 50MB page cache
> > allocating, that is the main reason with no memory reclaims happening.
> > '500MB' low boundary obviously overcommitment, so leaf_cg[E] will
> > get the part of parent’s protection proportional to its actual memory
> > usage. However, it doesn't matter for this case, leaf_cg[E] can get
> > no event grows as well. Because it has no memory consumption at all.
>
> leaf_cg[F]'s memory.low == 0. So how can it have reclaim events where
> memory.current < memory.low?
>
> Testing on the upstream kernel there are no low events in F.
>
> A bit weird...
>
> From my test, it indeed has the events that occur.
> (even the original test fail as the same)
> And the leaf_cg[F]'s memory.current is almost 1MB.
>
> # uname -r
> 5.17.0-rc4.liwang
> ...
> tst_test.c:1521: TINFO: Testing on xfs
> tst_test.c:996: TINFO: Formatting /dev/loop0 with xfs opts='' extra opts=''
> tst_test.c:1452: TINFO: Timeout per run is 0h 05m 00s
> memcontrol04.c:118: TINFO: Child 21200 in leaf_C: Allocating pagecache: 52428800
> memcontrol04.c:118: TINFO: Child 21201 in leaf_D: Allocating pagecache: 52428800
> memcontrol04.c:118: TINFO: Child 21202 in leaf_F: Allocating pagecache: 52428800
> memcontrol04.c:99: TINFO: Child 21203 in trunk_G: Allocating anon: 155189248
> memcontrol04.c:170: TPASS: Expect: (A/B memory.current=54083584) ~= 52428800
> memcontrol04.c:176: TPASS: Expect: (A/B/C memory.current=29822976) ~= 34603008
> memcontrol04.c:178: TPASS: Expect: (A/B/D memory.current=22061056) ~= 17825792
> memcontrol04.c:180: TPASS: Expect: (A/B/E memory.current=0) ~= 0
> memcontrol04.c:99: TINFO: Child 21204 in trunk_G: Allocating anon: 174063616
> memcontrol04.c:193: TPASS: Expect: (leaf_cg0: oom events=0) == 0
> memcontrol04.c:196: TPASS: Expect: (leaf_cg0: low events=427) > 0
> memcontrol04.c:193: TPASS: Expect: (leaf_cg1: oom events=0) == 0
> memcontrol04.c:196: TPASS: Expect: (leaf_cg1: low events=427) > 0
> memcontrol04.c:193: TPASS: Expect: (leaf_cg2: oom events=0) == 0
> memcontrol04.c:198: TPASS: Expect: (leaf_cg2: low events=0) == 0
> memcontrol04.c:193: TPASS: Expect: (leaf_cg3: oom events=0) == 0
> memcontrol04.c:198: TFAIL: Expect: (leaf_cg3: low events=415) == 0
>
> Summary:
> passed 44
> failed 4
> broken 0
> skipped 0
> warnings 0
>
> # pwd
> /root/linux-5.17-rc4/tools/testing/selftests/cgroup
>
> # ./test_memcontrol
> ok 1 test_memcg_subtree_control
> ok 2 test_memcg_current
> ok 3 test_memcg_min
> not ok 4 test_memcg_low
I tested on 5.17-rc4 and it still passed. I also printed some more info
EXT4:
memcontrol04.c:118: TINFO: Child 507 in leaf_C: Allocating pagecache: 52428800
memcontrol04.c:118: TINFO: Child 508 in leaf_D: Allocating pagecache: 52428800
memcontrol04.c:118: TINFO: Child 509 in leaf_F: Allocating pagecache: 52428800
memcontrol04.c:99: TINFO: Child 510 in trunk_G: Allocating anon: 155189248
memcontrol04.c:170: TPASS: Expect: (A/B memory.current=54157312) ~= 52428800
memcontrol04.c:176: TPASS: Expect: (A/B/C memory.current=31477760) ~= 34603008
memcontrol04.c:178: TPASS: Expect: (A/B/D memory.current=21635072) ~= 17825792
memcontrol04.c:180: TPASS: Expect: (A/B/E memory.current=0) ~= 0
memcontrol04.c:182: TINFO: A/B/F memory.current=970752
memcontrol04.c:99: TINFO: Child 511 in trunk_G: Allocating anon: 174063616
memcontrol04.c:195: TINFO: A: low events=1229, oom events=0
memcontrol04.c:195: TINFO: B: low events=1229, oom events=0
memcontrol04.c:195: TINFO: G: low events=0, oom events=0
memcontrol04.c:208: TPASS: Expect: (C oom events=0) == 0
memcontrol04.c:211: TPASS: Expect: (C low events=412) > 0
memcontrol04.c:208: TPASS: Expect: (D oom events=0) == 0
memcontrol04.c:211: TPASS: Expect: (D low events=412) > 0
memcontrol04.c:208: TPASS: Expect: (E oom events=0) == 0
memcontrol04.c:213: TPASS: Expect: (E low events=0) == 0
memcontrol04.c:208: TPASS: Expect: (F oom events=0) == 0
memcontrol04.c:213: TPASS: Expect: (F low events=0) == 0
XFS:
memcontrol04.c:118: TINFO: Child 523 in leaf_C: Allocating pagecache: 52428800
memcontrol04.c:118: TINFO: Child 524 in leaf_D: Allocating pagecache: 52428800
memcontrol04.c:118: TINFO: Child 525 in leaf_F: Allocating pagecache: 52428800
memcontrol04.c:99: TINFO: Child 526 in trunk_G: Allocating anon: 155189248
memcontrol04.c:170: TPASS: Expect: (A/B memory.current=54038528) ~= 52428800
memcontrol04.c:176: TPASS: Expect: (A/B/C memory.current=30371840) ~= 34603008
memcontrol04.c:178: TPASS: Expect: (A/B/D memory.current=22536192) ~= 17825792
memcontrol04.c:180: TPASS: Expect: (A/B/E memory.current=0) ~= 0
memcontrol04.c:182: TINFO: A/B/F memory.current=942080
memcontrol04.c:99: TINFO: Child 527 in trunk_G: Allocating anon: 174063616
memcontrol04.c:195: TINFO: A: low events=1288, oom events=0
memcontrol04.c:195: TINFO: B: low events=1288, oom events=0
memcontrol04.c:195: TINFO: G: low events=0, oom events=0
memcontrol04.c:208: TPASS: Expect: (C oom events=0) == 0
memcontrol04.c:211: TPASS: Expect: (C low events=432) > 0
memcontrol04.c:208: TPASS: Expect: (D oom events=0) == 0
memcontrol04.c:211: TPASS: Expect: (D low events=432) > 0
memcontrol04.c:208: TPASS: Expect: (E oom events=0) == 0
memcontrol04.c:213: TPASS: Expect: (E low events=0) == 0
memcontrol04.c:208: TPASS: Expect: (F oom events=0) == 0
memcontrol04.c:213: TPASS: Expect: (F low events=0) == 0
BTRFS:
memcontrol04.c:118: TINFO: Child 548 in leaf_C: Allocating pagecache: 52428800
memcontrol04.c:118: TINFO: Child 549 in leaf_D: Allocating pagecache: 52428800
memcontrol04.c:118: TINFO: Child 550 in leaf_F: Allocating pagecache: 52428800
memcontrol04.c:99: TINFO: Child 551 in trunk_G: Allocating anon: 155189248
memcontrol04.c:170: TPASS: Expect: (A/B memory.current=54140928) ~= 52428800
memcontrol04.c:176: TPASS: Expect: (A/B/C memory.current=29540352) ~= 34603008
memcontrol04.c:178: TPASS: Expect: (A/B/D memory.current=21815296) ~= 17825792
memcontrol04.c:180: TPASS: Expect: (A/B/E memory.current=0) ~= 0
memcontrol04.c:182: TINFO: A/B/F memory.current=2711552
memcontrol04.c:99: TINFO: Child 552 in trunk_G: Allocating anon: 174063616
memcontrol04.c:195: TINFO: A: low events=1245, oom events=0
memcontrol04.c:195: TINFO: B: low events=1245, oom events=0
memcontrol04.c:195: TINFO: G: low events=0, oom events=0
memcontrol04.c:208: TPASS: Expect: (C oom events=0) == 0
memcontrol04.c:211: TPASS: Expect: (C low events=423) > 0
memcontrol04.c:208: TPASS: Expect: (D oom events=0) == 0
memcontrol04.c:211: TPASS: Expect: (D low events=423) > 0
memcontrol04.c:208: TPASS: Expect: (E oom events=0) == 0
memcontrol04.c:213: TPASS: Expect: (E low events=0) == 0
memcontrol04.c:208: TPASS: Expect: (F oom events=0) == 0
memcontrol04.c:213: TPASS: Expect: (F low events=0) == 0
I will post another version of the patch-set with the extra debug
info. I wonder if the low events in F are from the parent (B)?
--
Thank you,
Richard.
--
Mailing list info: https://lists.linux.it/listinfo/ltp
prev parent reply other threads:[~2022-02-17 5:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-08 14:03 [LTP] [PATCH 0/3] memcontrol04 and s/cgroup/cg/ Richard Palethorpe via ltp
2022-02-08 14:03 ` [LTP] [PATCH 1/3] API/cgroup: Add memory.{events, low} Richard Palethorpe via ltp
2022-02-16 15:27 ` Cyril Hrubis
2022-02-17 3:14 ` Li Wang
2022-02-08 14:03 ` [LTP] [PATCH 2/3] API/cgroup: Shorten cgroup to cg in most symbols Richard Palethorpe via ltp
2022-02-09 4:51 ` Li Wang
2022-02-10 7:32 ` Richard Palethorpe
2022-02-16 15:26 ` Cyril Hrubis
2022-02-17 3:13 ` Li Wang
2022-02-17 5:37 ` Richard Palethorpe
2022-02-08 14:03 ` [LTP] [PATCH 3/3] memcontrol04: Copy from kselftest Richard Palethorpe via ltp
2022-02-09 10:47 ` Li Wang
2022-02-10 7:34 ` Richard Palethorpe
2022-02-09 11:05 ` Li Wang
2022-02-10 6:23 ` Li Wang
2022-02-10 7:12 ` Li Wang
2022-02-14 5:40 ` Richard Palethorpe
2022-02-16 10:13 ` Li Wang
2022-02-17 4:35 ` Richard Palethorpe [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=87wnhujc06.fsf@suse.de \
--to=rpalethorpe@suse.de \
--cc=liwang@redhat.com \
--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