From patchwork Thu Jan 13 10:19:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Po-Hsu Lin X-Patchwork-Id: 1579532 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=nbjgQg/M; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JZL5b6VtDz9s0r for ; Thu, 13 Jan 2022 21:19:47 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1n7xCo-0003mP-IH; Thu, 13 Jan 2022 10:19:42 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1n7xCm-0003lK-QZ for kernel-team@lists.ubuntu.com; Thu, 13 Jan 2022 10:19:40 +0000 Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 9E5A33F1EA for ; Thu, 13 Jan 2022 10:19:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1642069180; bh=i0KWD3g26gG+2zccJKonMtXe+RQeEQWNTftGK5K4Lvo=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=nbjgQg/MWXhYNsA/qHB4iNaELpwaaELqXsxmvjo97MG3+NtEOxY61W3WYxQcIyqV1 LQh9nuGiNlujKDescelt0zaCGKiHKaKY+YGAtTE8ZHgxYl+cVb1J2jo5eMiPN7P0vJ xahAk6xAd5KO3HAZuL4gajF/YTxMTUQTOdI2pVdcyMMuorKHKh//14EmQnjk7Gz6i+ noTu2LY2UOjs5SvAX8JUoo++XM1/dh0TSZNxpct1gbfo9IS6V//+VoksygUJDZ5p5N BfS0sVDdJb1qogqS+3jWRiHHnWyGVzvvH10Xw+Py0l7V/U4Wpdm8l8xigQriQmgMyQ yN0bK6QiNuHNg== Received: by mail-pj1-f71.google.com with SMTP id e16-20020a17090a119000b001b28f7b2a3bso6185733pja.8 for ; Thu, 13 Jan 2022 02:19:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i0KWD3g26gG+2zccJKonMtXe+RQeEQWNTftGK5K4Lvo=; b=LaAppfIAJrLo+TNHhyQOFF+8kTtp60OkI3hE8UQJcm+pvifpGJb7lr6OqpMqsHa3R1 yjhKOwf3q5mjACy3l1M3oZuhwyXfmzGWuLjqrxl7OuYtmRXyv37cXlS+EujLdzDwhc2s FJ1/e37xvDCeTXVnZAENudpDBh29+rHxKkDbH4D/zehJF6NKBQX3jVp/KmZdG9F6xytx bVGD4FLgS1Tip8gzaekL6rp8Kt8o/cXcnd8bE46uK8F61l/gcqHhi7sKrgjRz4WUsccp yU2WjXQ6G74ppdlG+A5V0LUo2Id88gL7Ue6CQP2bEZboMKZPzm1sSIltR7om3Pu+pgRJ AlPg== X-Gm-Message-State: AOAM531vVj6XBgZ6ZVjsSiMFcB5OVb639BaLTqGCWbhVn2nL8uJHcyRz E99LfwqYHt8blxp/PLCvGZIquXZkwrkmAiw1Ycjan0s2E9H8ofEcrkfM9CBT+ukN2USi9UvOTFa Ctk7f00j+nCbId4MmsGqn0PZCjJsy1gfu8jhpXgsp X-Received: by 2002:a17:90a:4b45:: with SMTP id o5mr4318186pjl.121.1642069179295; Thu, 13 Jan 2022 02:19:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwIlkDgB3JKmRisn3da13Ll0V4t+YDw1Ws9+gwpi+LmvXhVAbuQ0cIlPHxNhauR6qIu5z2vPw== X-Received: by 2002:a17:90a:4b45:: with SMTP id o5mr4318156pjl.121.1642069178976; Thu, 13 Jan 2022 02:19:38 -0800 (PST) Received: from localhost.localdomain (223-136-153-100.emome-ip.hinet.net. [223.136.153.100]) by smtp.gmail.com with ESMTPSA id l27sm1986478pgb.0.2022.01.13.02.19.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jan 2022 02:19:38 -0800 (PST) From: Po-Hsu Lin To: kernel-team@lists.ubuntu.com Subject: [Impish][SRU][PATCH 1/1] selftests: memory-hotplug: avoid spamming logs with dump_page(), ratio limit hot-remove error test Date: Thu, 13 Jan 2022 18:19:15 +0800 Message-Id: <20220113101915.14259-2-po-hsu.lin@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220113101915.14259-1-po-hsu.lin@canonical.com> References: <20220113101915.14259-1-po-hsu.lin@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Paolo Pisati BugLink: https://bugs.launchpad.net/bugs/1941829 While the offline memory test obey ratio limit, the same test with error injection does not and tries to offline all the hotpluggable memory, spamming system logs with hundreds of thousands of dump_page() entries, slowing system down (to the point the test itself timesout and gets terminated) and excessive fs occupation: ... [ 9784.393354] page:c00c0000007d1b40 refcount:3 mapcount:0 mapping:c0000001fc03e950 index:0xe7b [ 9784.393355] def_blk_aops [ 9784.393356] flags: 0x3ffff800002062(referenced|active|workingset|private) [ 9784.393358] raw: 003ffff800002062 c0000001b9343a68 c0000001b9343a68 c0000001fc03e950 [ 9784.393359] raw: 0000000000000e7b c000000006607b18 00000003ffffffff c00000000490d000 [ 9784.393359] page dumped because: migration failure [ 9784.393360] page->mem_cgroup:c00000000490d000 [ 9784.393416] migrating pfn 1f46d failed ret:1 ... $ grep "page dumped because: migration failure" /var/log/kern.log | wc -l 2405558 $ ls -la /var/log/kern.log -rw-r----- 1 syslog adm 2256109539 Jun 30 14:19 /var/log/kern.log Signed-off-by: Paolo Pisati Acked-by: Krzysztof Kozlowski Signed-off-by: Shuah Khan (cherry picked from commit 0c0f6299ba71faf610e311605e09e96331c45f28) Signed-off-by: Po-Hsu Lin --- tools/testing/selftests/memory-hotplug/mem-on-off-test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh index b37585e..46a97f3 100755 --- a/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh +++ b/tools/testing/selftests/memory-hotplug/mem-on-off-test.sh @@ -282,7 +282,9 @@ done # echo $error > $NOTIFIER_ERR_INJECT_DIR/actions/MEM_GOING_OFFLINE/error for memory in `hotpluggable_online_memory`; do - offline_memory_expect_fail $memory + if [ $((RANDOM % 100)) -lt $ratio ]; then + offline_memory_expect_fail $memory + fi done echo 0 > $NOTIFIER_ERR_INJECT_DIR/actions/MEM_GOING_OFFLINE/error