From: Yosry Ahmed <yosryahmed@google.com>
To: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeelb@google.com>,
Muchun Song <muchun.song@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, cgroups@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [PATCH v3] mm: memcg: use rstat for non-hierarchical stats
Date: Thu, 3 Aug 2023 11:52:21 -0700 [thread overview]
Message-ID: <CAJD7tkZ2u0db3UP3K+2ag12VCRhzjJVrwipsyMV2fb9jdfwCzg@mail.gmail.com> (raw)
In-Reply-To: <ZMu/+ysmksCZqcem@dhcp22.suse.cz>
On Thu, Aug 3, 2023 at 7:55 AM Michal Hocko <mhocko@suse.com> wrote:
>
> On Wed 02-08-23 15:02:55, Yosry Ahmed wrote:
> [...]
> > Let me know if the testing is satisfactory for you. I can send an
> > updated commit log accordingly with a summary of this conversation.
>
> Yes this should be sufficient as it exercises all the CPUs so the
> overhead in flushing should be visible if this was a real deal. I would
> have gone with kernel build test as that has a broader code coverage but
> this artificial test should give some red flags as well. So good enough.
> Amending the changelog with this would be helpful as well so that future
> us and others will know what kind of testing has been done.
>
> Acked-by: Michal Hocko <mhocko@suse.com>
Thanks! I sent a v4 with your Ack and an amended changelog that
describes the testing done and points to the script attached here.
>
> >
> > > > --
> > > > Michal Hocko
> > > > SUSE Labs
>
> > #!/bin/bash
> >
> > NR_CPUS=$(getconf _NPROCESSORS_ONLN)
> > NR_CGROUPS=$(( NR_CPUS * 2 ))
> > TEST_MB=50
> > TOTAL_MB=$((TEST_MB * NR_CGROUPS))
> > TMPFS=$(mktemp -d)
> > ROOT="/sys/fs/cgroup/"
> > ZRAM_DEV="/mnt/devtmpfs/zram0"
> >
> > cleanup() {
> > umount $TMPFS
> > rm -rf $TMPFS
> > for i in $(seq $NR_CGROUPS); do
> > cgroup="$ROOT/cg$i"
> > rmdir $cgroup
> > done
> > swapoff $ZRAM_DEV
> > echo 1 > "/sys/block/zram0/reset"
> > }
> > trap cleanup INT QUIT EXIT
> >
> > # Setup zram
> > echo $((TOTAL_MB << 20)) > "/sys/block/zram0/disksize"
> > mkswap $ZRAM_DEV
> > swapon $ZRAM_DEV
> > echo "Setup zram done"
> >
> > # Create cgroups, set limits
> > echo "+memory" > "$ROOT/cgroup.subtree_control"
> > for i in $(seq $NR_CGROUPS); do
> > cgroup="$ROOT/cg$i"
> > mkdir $cgroup
> > echo $(( (TEST_MB << 20) / 4)) > "$cgroup/memory.max"
> > done
> > echo "Setup cgroups done"
> >
> > # Start workers to allocate tmpfs memory
> > mount -t tmpfs none $TMPFS
> > for i in $(seq $NR_CGROUPS); do
> > cgroup="$ROOT/cg$i"
> > f="$TMPFS/tmp$i"
> > (echo 0 > "$cgroup/cgroup.procs" &&
> > dd if=/dev/zero of=$f bs=1M count=$TEST_MB status=none &&
> > cat $f > /dev/null)&
> > done
> >
> > # Wait for workers
> > wait
>
>
> --
> Michal Hocko
> SUSE Labs
prev parent reply other threads:[~2023-08-03 18:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 15:32 [PATCH] " Yosry Ahmed
2023-07-26 15:32 ` [PATCH v3] " Yosry Ahmed
2023-08-01 14:30 ` Michal Hocko
2023-08-01 16:39 ` Yosry Ahmed
2023-08-01 17:29 ` Yosry Ahmed
2023-08-02 7:40 ` Michal Hocko
2023-08-02 8:11 ` Yosry Ahmed
2023-08-02 22:02 ` Yosry Ahmed
2023-08-03 14:55 ` Michal Hocko
2023-08-03 18:52 ` Yosry Ahmed [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=CAJD7tkZ2u0db3UP3K+2ag12VCRhzjJVrwipsyMV2fb9jdfwCzg@mail.gmail.com \
--to=yosryahmed@google.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeelb@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