linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Galbraith <efault@gmx.de>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: mm: LTP/memcg testcase regression induced by 8cd7c588decf..66ce520bb7c2 series
Date: Tue, 23 Nov 2021 12:06:19 +0100	[thread overview]
Message-ID: <56b8e72693d5a0247beb95482bdfacf1a158a859.camel@gmx.de> (raw)
In-Reply-To: <20211123091304.GC3366@techsingularity.net>

On Tue, 2021-11-23 at 09:13 +0000, Mel Gorman wrote:
> On Sun, Nov 21, 2021 at 11:57:20AM +0100, Mike Galbraith wrote:
> > Greetings,
> >
> > FYI, something in this series causes LTP controllers::memcg_regression
> > testcase to hang forever.  Verified via brute force revert of the lot.
> >
> > After letting box moan for 4.5 hours, I poked ^C repeatedly, but runltp
> > didn't exit/recover gracefully, and ps hung, so I nuked the box.  All
> > memcg_test_1 instances were stuck in reclaim_throttle().
> >
>
> I'll see can I reproduce this but do you know offhand what the test is
> doing and what the expected outcome is? A possibility is that this is a
> test that is driving the machine near OOM (or at least memcg OOM) and
> getting throttled instead of getting killed.

Here's the hanging test 4.

testcases/bin/memcg_regression_test.sh:
test_4()
{
        ./memcg_test_4.sh

        check_kernel_bug
        if [ $? -eq 1 ]; then
                tst_resm TPASS "no kernel bug was found"
        fi

        # test_4.sh might be killed by oom, so do clean up here
        killall -9 memcg_test_4 2> /dev/null
        killall -9 memcg_test_4.sh 2> /dev/null

        # if test_4.sh gets killed, it won't clean cgroup it created
        rmdir memcg/0 2> /dev/null

        swapon -a
}

testcases/bin/memcg_test_4.sh:
# attach current task to memcg/0/
mkdir memcg/0
echo $$ > memcg/0/tasks

./memcg_test_4 &
pid=$!
sleep 1

# let $pid allocate 100M memory
/bin/kill -SIGUSR1 $pid
sleep 1

# shrink memory, and then 80M will be swapped
echo 40M > memcg/0/memory.limit_in_bytes

# turn off swap, and swapoff will be killed
swapoff -a
sleep 1
echo $pid > memcg/tasks 2> /dev/null
echo $$ > memcg/tasks 2> /dev/null

# now remove the cgroup
rmdir memcg/0

  reply	other threads:[~2021-11-23 11:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-21 10:57 mm: LTP/memcg testcase regression induced by 8cd7c588decf..66ce520bb7c2 series Mike Galbraith
2021-11-21 13:51 ` Thorsten Leemhuis
2021-11-22  6:46   ` Mike Galbraith
2021-11-22  7:41     ` Mike Galbraith
2021-11-23  9:13 ` Mel Gorman
2021-11-23 11:06   ` Mike Galbraith [this message]
2021-11-23 11:18   ` Mike Galbraith
2021-11-23 13:12     ` Mike Galbraith
2021-11-23 14:28       ` Mike Galbraith
2021-11-24 14:56     ` Mel Gorman
2021-11-24 16:21       ` Mike Galbraith

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=56b8e72693d5a0247beb95482bdfacf1a158a859.camel@gmx.de \
    --to=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    /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;
as well as URLs for NNTP newsgroup(s).