From patchwork Mon Feb 5 22:56:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nhat Pham X-Patchwork-Id: 13546372 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4331BC4829A for ; Mon, 5 Feb 2024 22:56:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A51F66B007D; Mon, 5 Feb 2024 17:56:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A02C06B0080; Mon, 5 Feb 2024 17:56:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8A3546B0081; Mon, 5 Feb 2024 17:56:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 713F96B007D for ; Mon, 5 Feb 2024 17:56:13 -0500 (EST) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 3C5AD120755 for ; Mon, 5 Feb 2024 22:56:13 +0000 (UTC) X-FDA: 81759260226.02.B02517B Received: from mail-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) by imf03.hostedemail.com (Postfix) with ESMTP id 69D0720011 for ; Mon, 5 Feb 2024 22:56:11 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=UCscsNvB; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.217.44 as permitted sender) smtp.mailfrom=nphamcs@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707173771; a=rsa-sha256; cv=none; b=QS+6bJgy3o8JRW8Af8AtRyox3zWXNn6Y7yC048ORoIPr7/aWLtGtq75d6YLiWAIQ/TlJif 5/gHWqU6lJB6EyUk9eAnfVdtwiUHM+I8dDfXdVcdkvVy80dTydGtD/+7hFmZvnhN3p0E2F 0iehVHaWPWbmbPstHsNvSGAX5siKhFk= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=UCscsNvB; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf03.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.217.44 as permitted sender) smtp.mailfrom=nphamcs@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707173771; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=0dsOQxIuZglfzGL/UkHixra2YxsOVoucMj4slNXKYQ0=; b=IHo7Jgcz1YC518pHMnXq3TtmLPNcCHFsLuYWv+4/wxtFiTU51hpWkyTHRr2Du+GdgeFpiL bRH27/RWvuwbGVC5o5GDYo56RtcfwHN9bbOVz3gI0dBK4/YiXtETMQL7eXyMMAvdYtaT4b 7ELcdjfsVfpaipvLk5UjpGWNJIAV4M0= Received: by mail-vs1-f44.google.com with SMTP id ada2fe7eead31-46d2dff740dso355130137.2 for ; Mon, 05 Feb 2024 14:56:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707173770; x=1707778570; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0dsOQxIuZglfzGL/UkHixra2YxsOVoucMj4slNXKYQ0=; b=UCscsNvBi4X/BaRHp9TYaYB1hnuWLkO+q2Rdjl6J/AtOHxTNs9Zt270ITIn5jPg7sF K33XIgQ6rR6ocO/HFdcIqDghME7+UM1pTnkpsHQ+XBGSJw1b+Ja1C6kigWMyIGIfrczZ 9uaaRSd9YwHjpmwVstQcBorchaW3TX2Bf6+eZPPNIedJW6WH/9TyHd4M5kr3RJa4QOT8 9VweQ7/Be5t78VP+0AGVWLiZcdSJPA3E6f24TImHBwrxt2cdq2JshAReP8ivPZTsnCqV 6Tb8VoEFrN4mR/T7PdozlAqvkrKFsKqjiPaQ8QZPwMTCWyM7Ntt0xoziFwGyoy+8bowz 3/Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707173770; x=1707778570; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0dsOQxIuZglfzGL/UkHixra2YxsOVoucMj4slNXKYQ0=; b=AdlG75JTi1fAFpju3r8e+LHIux3bltM4PAoBr9+EPacGPqGZjMyHzDyhuosoGX27ai U/ALB5DjBNPS/aFCz1UkTLgEUspOW7JKhAOIjjT6e2f0J9cbE0PGCMbzxF708SqffQpE degREmSBnQtziveb2OqufHGpZgGwWFePYTc1p0IbXSaCjfqyxxvyC3P9gYBEDqyVmUu5 3HKiT5g9UMxNohAcVYIpnq4AYRO7tJrpbzFR3UAZ/al3J5mN4Ifg9P6eCAOUofyqxCvS LLUvE0+FOu5HrcDzaDq9koCn2iibSH/GA3q4nl9m1R55pw8AH+ND5F+8qapkFb0mc0BI t8oA== X-Gm-Message-State: AOJu0Ywbx16+VCKE+Bx1UzE7KKZNCVre4taoHCCc8wa4hLm3b2bDI8hL a0ujOfYBKIzbxrPmQmLrt3tiFv35OtGNh1ss+Encc8hghuL+T8LV X-Google-Smtp-Source: AGHT+IFV1B+G9o8CvxcMN6huuwce6++oo07ZBBECnU4NSWU45WI0gVmfqhod2IRB+zTWiuirM2ArzQ== X-Received: by 2002:a67:f943:0:b0:46d:1a45:fa17 with SMTP id u3-20020a67f943000000b0046d1a45fa17mr297997vsq.7.1707173770466; Mon, 05 Feb 2024 14:56:10 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCXv2T5epHhjVpbPo8Hg+vYMCZlBiki07P+Chd3M52zwZTeQd1rAFiYC5lKFN4O8RLtJxJOEJ3QIHY4vvZjUMU4jv3OAOraB6/NpWN+FMzZY3vRcmuacj4pqGleuweIfJvM/dNZcp61u5lSRJd8ruOUgVyVhFmmAaCCovDU8kXn785oiLgAvM/pnvj3wixwysmjfWA2CSL4GCnJTfczW3SID87jJVgA376FhH81Ofsm2lb2GwLownGFbb2iniL9vd9BjVYsiCNj7lL9BX6Lwl5vDbm74cijKrF73E5lL898jM96kPHExYDMMZ3ht5/K3X7wqfYmbAMXkqS+Ak+Vl5kc3QK2EOJ36MzIDu6SC8Zr12yEKKKd/Yo3quldFrKHOnAC7Q/5ACWD7sEubRGXLIIo= Received: from localhost (fwdproxy-nao-006.fbsv.net. [2a03:2880:23ff:6::face:b00c]) by smtp.gmail.com with ESMTPSA id mu9-20020a056214328900b0068cac993878sm424486qvb.115.2024.02.05.14.56.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 14:56:10 -0800 (PST) From: Nhat Pham To: akpm@linux-foundation.org Cc: riel@surriel.com, shuah@kernel.org, hannes@cmpxchg.org, yosryahmed@google.com, tj@kernel.org, lizefan.x@bytedance.com, roman.gushchin@linux.dev, linux-mm@kvack.org, kernel-team@meta.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v3 1/3] selftests: zswap: add zswap selftest file to zswap maintainer entry Date: Mon, 5 Feb 2024 14:56:06 -0800 Message-Id: <20240205225608.3083251-2-nphamcs@gmail.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240205225608.3083251-1-nphamcs@gmail.com> References: <20240205225608.3083251-1-nphamcs@gmail.com> MIME-Version: 1.0 X-Rspam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PS4u1zqANO+c0 xKyxm4hS sUMcRAWoCjarKUnTO2zBRWb6CMnhcEayXilJa9rAoaomXAu/ekel6JXCngUW+cZM0AwIan7AIroQKSJ6V19GAYCgqq1U8BuepQgl+jkGQvDgbDcealNCTlNcMIDFcPbM8KUehAzv8SCt2wW414AE/uIICYZ2bn4yRkjRuY7duCdECe62lmkvroU/7xxw5oKr6yXDqBTcr7C+rH+18AU4cTA3W/3KlQIi20krts0UPycNt5yNOMr6LEQVT3GNIZ5Tf+G2J3io6v8lHJtlSHKZq1rNFO7E+xhARf37SxHRp4lB885WjqKzsn6jyRWLa6mC5OhOulZ+Fzc/2d//KZYPVhxBObYDgMpiosyRJ7itLQ8AZhy77nU48xfHQlDJeMTz2q97lRexTpqBp4TjJD8TZkixLL+pm9uId50f9V2sR72OWyoJX1c+dKrr5UO3Bcqo5IZxcGkm9MTG0SGAUPc8saQUUQWMSB3oIugNhqHorowYcoe0CZeTvXc305gVns1GPJCYp X-Bogosity: Ham, tests=bogofilter, spamicity=0.000143, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Make it easier for contributors to find the zswap maintainers when they update the zswap tests. Signed-off-by: Nhat Pham Acked-by: Yosry Ahmed --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6527850f24d1..126090f0e418 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -24398,6 +24398,7 @@ F: include/linux/zpool.h F: include/linux/zswap.h F: mm/zpool.c F: mm/zswap.c +F: tools/testing/selftests/cgroup/test_zswap.c THE REST M: Linus Torvalds From patchwork Mon Feb 5 22:56:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nhat Pham X-Patchwork-Id: 13546373 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A0E2C48260 for ; Mon, 5 Feb 2024 22:56:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E66D6B0080; Mon, 5 Feb 2024 17:56:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 546F86B0081; Mon, 5 Feb 2024 17:56:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3244A6B0082; Mon, 5 Feb 2024 17:56:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 23BDC6B0080 for ; Mon, 5 Feb 2024 17:56:14 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E925E14028B for ; Mon, 5 Feb 2024 22:56:13 +0000 (UTC) X-FDA: 81759260226.25.DA4AA87 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) by imf02.hostedemail.com (Postfix) with ESMTP id 4760D80013 for ; Mon, 5 Feb 2024 22:56:12 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gCl3nPJZ; spf=pass (imf02.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.219.53 as permitted sender) smtp.mailfrom=nphamcs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707173772; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=leL/vEiB0VeH8ZIF97IARUVmsuNbNROoZaGIt1HbTGM=; b=sxewFkIwVsMwMf+AgeokjsUMqOLm/UX4mpXJs/t79oTxe+DJwN+PKq/qtHOHXAIELLFLUm gnRmJe/XRdkPdt/jSVj1WiH4sl6otbXM9gNmN+xsdL9/vN4sxglasG1ZwJYC3XubTBHzSY dRAfdEXfZQV/QcsHlFFksJfFbcxSe6k= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707173772; a=rsa-sha256; cv=none; b=V6yGUVHnwBiceYtEc+yuGmTzcQVEHnp5Y70FuPYlGGbCuXL9t96LQ0P7yhg//6OER+yCoc IQSnsxP4HjUSIOMv+JctH1gMqP8pX1cj8anT3690NMnyh/lnv7qVr/NNxwtdSPoykcZvYa pBBZVez6ZIvWgPKQrJ2DmxHg/qnfCmU= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=gCl3nPJZ; spf=pass (imf02.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.219.53 as permitted sender) smtp.mailfrom=nphamcs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-68c814135a9so18922406d6.1 for ; Mon, 05 Feb 2024 14:56:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707173771; x=1707778571; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=leL/vEiB0VeH8ZIF97IARUVmsuNbNROoZaGIt1HbTGM=; b=gCl3nPJZeQ8FQRhUdBUQY4+e74YBY9wNQey+DYNX4qpqO9sU+kjKUMWLCvSbOK+OO4 c/c3dKG583YL3Me7eEayax3eO2d0NFeaPmhXA+MmKjfFZAvEbL7n+Hcc8cPzwW7pocXo 8unQzzIN28q5xXAIM5uwjfVut63B6BVITX8syQ5dLjG8/FsOcx2lv4MMbI4msMnJGjsI e6LA1+sABaeB17nuo4oosu2D5zE0tErIr9s6VRx1+91aj/DqkAAhaoOHyWZHfXm4Vdmn 9yJff7vhr+5I/xSYcerJ71Zz4noT6fNOOWhVfTa5YgGyLfiztDZGcqhKT+OxeEcgoe6+ pLsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707173771; x=1707778571; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=leL/vEiB0VeH8ZIF97IARUVmsuNbNROoZaGIt1HbTGM=; b=mqUtKkDw8K42J2atoJ4RnFTVV8tBVYAVeSWhsHep3w8u+sQwKRyua/MI8pmngl2u5W SH+vQibZByF+5XgSHZHDg7nvM30/maS/2SIDY3H3LAQBJar/Vb9nb7H9iOuViWMxoBig DqojhvkGReoEGUrbL+RiIlDgkvxXRl3ms9vWY8lSj41tOqb9/xXt51+Sv5Y6Lb6TXhZq jw4v1zoH9bJEZL9WVIZdhOLUdeZzBGz65kuHDbHgevIurQJHrioRE2UWMGXk2iaXVzO9 Q5mTR6XPUvpHjhrxDpyQJWpH0wU0yIgFko/6AjXOIiDXP4GYMddEA/r1awQ82vKpQnJ4 4W8g== X-Gm-Message-State: AOJu0YzMSOZ6Y7eUvNXGoVy91cGv8SkKEpBHnuD3iNZn8cR1Zd3U+Vgg F5z6rra3YEBPfDQi0TFvoiRFba/LisaMYPBVNEh1Ly0lQ8CttKAg X-Google-Smtp-Source: AGHT+IESv97Kd8go2vQYFQli2hhUNviKbARAN2odGnIcieOptqRe4kVgIWNQc5zdOUprmXtRMEzg3Q== X-Received: by 2002:a05:6214:19ce:b0:68c:930e:6f49 with SMTP id j14-20020a05621419ce00b0068c930e6f49mr458443qvc.36.1707173771373; Mon, 05 Feb 2024 14:56:11 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUCB274hPBtIag/AKoEk9o51vlokXWUWAxRE5V+Cz4My769VWoTejn2B1RAUCKKHbwcPLGoh+DbFwmU6KsfZgCcgH0wRnXWCOZngGJD7cmcs4vcKLVE9sTY6JFoELRq2eYGkxocLIj2as554uq56BmopBHWg5x8HAhLEaBOFRtdI4IRQDB6ccDlZfNGKLjtJ1eSpUn+JZ62iooCUAeriwm9z+w5PdcnTstjiBFbtcjmH+3giaUqKCAjZ9hOJeJF10XqvdB6jHHxjK2rrhGU+IKj+e7U0gQXMgTYkhNC4/+l8uI4oE9Lb4ZHnfpg3zOjQAfpk70OaOK5z464WgSLo9zW7cGhZBBAH9YCl1DYhGox66WdzafeB10RxjBNMUMi4Rawu+mYI0t6VUsMLM2mRb4= Received: from localhost (fwdproxy-nao-004.fbsv.net. [2a03:2880:23ff:4::face:b00c]) by smtp.gmail.com with ESMTPSA id e15-20020a0cf74f000000b0068c4b445991sm428451qvo.67.2024.02.05.14.56.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 14:56:11 -0800 (PST) From: Nhat Pham To: akpm@linux-foundation.org Cc: riel@surriel.com, shuah@kernel.org, hannes@cmpxchg.org, yosryahmed@google.com, tj@kernel.org, lizefan.x@bytedance.com, roman.gushchin@linux.dev, linux-mm@kvack.org, kernel-team@meta.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v3 2/3] selftests: fix the zswap invasive shrink test Date: Mon, 5 Feb 2024 14:56:07 -0800 Message-Id: <20240205225608.3083251-3-nphamcs@gmail.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240205225608.3083251-1-nphamcs@gmail.com> References: <20240205225608.3083251-1-nphamcs@gmail.com> MIME-Version: 1.0 X-Stat-Signature: mjtmyrnnb35iexrj3whugd3cro4ig97w X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 4760D80013 X-Rspam-User: X-HE-Tag: 1707173772-2357 X-HE-Meta: U2FsdGVkX18D2Dnjj4Kl2+UpFbuDkAsvsQdZ96z3SnYs6Z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ofilter, spamicity=0.001338, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: The zswap no invasive shrink selftest breaks because we rename the zswap writeback counter (see [1]). Fix the test. [1]: https://patchwork.kernel.org/project/linux-kselftest/patch/20231205193307.2432803-1-nphamcs@gmail.com/ Fixes: a697dc2be925 ("selftests: cgroup: update per-memcg zswap writeback selftest") Signed-off-by: Nhat Pham Acked-by: Yosry Ahmed --- tools/testing/selftests/cgroup/test_zswap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/cgroup/test_zswap.c b/tools/testing/selftests/cgroup/test_zswap.c index 47fdaa146443..32ce975b21d1 100644 --- a/tools/testing/selftests/cgroup/test_zswap.c +++ b/tools/testing/selftests/cgroup/test_zswap.c @@ -52,7 +52,7 @@ static int get_zswap_stored_pages(size_t *value) static int get_cg_wb_count(const char *cg) { - return cg_read_key_long(cg, "memory.stat", "zswp_wb"); + return cg_read_key_long(cg, "memory.stat", "zswpwb"); } static long get_zswpout(const char *cgroup) From patchwork Mon Feb 5 22:56:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nhat Pham X-Patchwork-Id: 13546374 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 446C9C4829A for ; Mon, 5 Feb 2024 22:56:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A52AA6B0082; Mon, 5 Feb 2024 17:56:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A02196B0083; Mon, 5 Feb 2024 17:56:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 80D376B0085; Mon, 5 Feb 2024 17:56:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 6C7CD6B0082 for ; Mon, 5 Feb 2024 17:56:16 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 19F1A1A04BC for ; Mon, 5 Feb 2024 22:56:16 +0000 (UTC) X-FDA: 81759260352.17.DBA579B Received: from mail-qt1-f174.google.com (mail-qt1-f174.google.com [209.85.160.174]) by imf18.hostedemail.com (Postfix) with ESMTP id 4D1AB1C001D for ; Mon, 5 Feb 2024 22:56:13 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=G0nMVm4L; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf18.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.160.174 as permitted sender) smtp.mailfrom=nphamcs@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707173773; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=8HqWjgU6D10aye5QHEqX+OBFLhtZ/fQssfKAsKXBKvY=; b=Qr/vET55OYRoBrjS1kcavvIBao4GtarfZ/7DvlacP2lJV3UqCq21EZM7lYVS/4mWTZB3f5 ssm0lN/S4NSLOvCmXO04BxuwaPBbeiTwfgLmLryY9YiI48Oxm/WOYxp+tNb8zCz3XE+YXu zpLA0lNr+S2w4q00i3ddSFnuL5rGQr8= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=G0nMVm4L; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf18.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.160.174 as permitted sender) smtp.mailfrom=nphamcs@gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707173773; a=rsa-sha256; cv=none; b=3vYVN3L+m0tKsOuaClKrrrmHLUSm+PVcai5bv0wUcq4kvyFlHUm4EwrymusxU21nGMqadU a9EIPIKQhNv3VD61hgqlm4CIs2Y07hvMRiC/I5E1yPbDKFTK5UyyW/YTLVBR8AYpKaps5G NDROQxZYu9yscC4f/BXFY71bR7lCvwI= Received: by mail-qt1-f174.google.com with SMTP id d75a77b69052e-42aabb1cdaaso38196911cf.2 for ; Mon, 05 Feb 2024 14:56:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707173772; x=1707778572; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8HqWjgU6D10aye5QHEqX+OBFLhtZ/fQssfKAsKXBKvY=; b=G0nMVm4LQBhMVGDIltdzgoGmuCAtPQttdS56awA4bQ5GAMBB6AbLCj8rudfXyALe2i yOa3DH1JsQzsZhIX06xd887tIqmktwhiIXk21HLltL5feX+HwNARv8GG4s2c7RsJNBJy Sw9IUgHOlFAF1mRfff+8wdjUB1POFEbBwx9MIulp1VH+4UkyePD67WyX38fJ47das8DO XbK5ffm9r1OAaZJcN11bbM/JQ6/C9muoZx685mbcki5w/Jm5XTdh4vUwtmO7oMlDmhEM u5q0F849ak59O9JbyOoNK8J03pu4zI3U+B1LMrvg/bewh366sqoLaPybrKORqKTv6kvr kF+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707173772; x=1707778572; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8HqWjgU6D10aye5QHEqX+OBFLhtZ/fQssfKAsKXBKvY=; b=cW2+GTZaQEuTR1nJliHIEoXzQtXK7v9gEmgi9Qk50wsKuTXveUNbft3ra27iCNpuK2 OBCcNf+XWOtSYO1eNpoMkJoVdC+15ul4C1SZ7Hn1Hjgd8nO1VbbQrUGNUagoC3yfBv2s A15lGUaHNOpU4oDD3hX3yJWJj0niKAVjIDS75pfuizxZ+h43mjf7NFKzoNC24TxcFp1+ GXh2etJ17W6sDL3Vul4oTYAqxzwI+9YjYu0H5VIzy9PtIXs9ZuQmykJtU7R2S322fSJE 1Hf471Mogg/Pp4VY95pGdmxWoeRGWXKcZl8j8p9ucVEWm9T6SQbRXguxi9lseCmkVzJF eyiA== X-Gm-Message-State: AOJu0YzKmSgiMHBTBzsh031aNf4TWKsEPck/yuFXy++fiFjVpsAJHX7K Fr3IU/pChJ1hl/wlOaSHPX2m7WJI42cqAMXgUCVWjWi9FpQGn7OT X-Google-Smtp-Source: AGHT+IGCJNv8Ji8AU8IubQXBQCs37V3e6UKJOoL7efbPjiM7OFm3oBHUGScLF4gh82NdJqEYVnvINw== X-Received: by 2002:a05:622a:48c:b0:42a:4350:64c7 with SMTP id p12-20020a05622a048c00b0042a435064c7mr856118qtx.68.1707173772351; Mon, 05 Feb 2024 14:56:12 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUqJ/8EC/uAZwZYtWAjBIdqbUeGbSxx64XcNJIk/q+Br0fd2ZnF42wZpS0SYMUietCy0wo5VDpFFrErX3imrvpZO7WUNzR0srWRl30TV27h+6vc/IS6iQWrv4/WZwlIoPcLjhVHGiLlYCHcOhLHtmU/XHgKHVHhuxMDRGoHmyQMpIEtQEnWW34EFfNe4blyDBX6rzDg4TWP0sFRajPTZJgN3taO51FviZbbDsTb2g6pQs2CZ1VtBqISF4HUt3BAYXagM3lV6duO/3YsUmZC9mGd1ykVuOVgbrKn5/IrLdfdhnCAgZS9LRo7X/PgcaV4z62Tujb6K1xdzYVGR7dc+ZgfZgASlu5mhpHQiT4/C7oRjIHVukimfyzDAXIBatf/OZoWz0Lci4ZJjl5Ne7STXbQ= Received: from localhost (fwdproxy-nao-001.fbsv.net. [2a03:2880:23ff:1::face:b00c]) by smtp.gmail.com with ESMTPSA id e2-20020ac845c2000000b0042c2034c54fsm367932qto.17.2024.02.05.14.56.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 14:56:12 -0800 (PST) From: Nhat Pham To: akpm@linux-foundation.org Cc: riel@surriel.com, shuah@kernel.org, hannes@cmpxchg.org, yosryahmed@google.com, tj@kernel.org, lizefan.x@bytedance.com, roman.gushchin@linux.dev, linux-mm@kvack.org, kernel-team@meta.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v3 3/3] selftests: add zswapin and no zswap tests Date: Mon, 5 Feb 2024 14:56:08 -0800 Message-Id: <20240205225608.3083251-4-nphamcs@gmail.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240205225608.3083251-1-nphamcs@gmail.com> References: <20240205225608.3083251-1-nphamcs@gmail.com> MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: xhpwh41768d4tssxtyxp8hekh9hmj8z5 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 4D1AB1C001D X-HE-Tag: 1707173773-268125 X-HE-Meta: U2FsdGVkX192TdUV3XPeRNHUzcnYVP1JAZemj/GZdX5lSp0lpd4qawvZA0W5+xTC+8nlBRwvlv4246mdHGkLKNFXuopTe45eainVo7lP+6GjQ1tL5zmrSUOdsE75iNFout4ZEvRb8cWFFhxswHW4l9zhidlWHD+OqAsISap2jaHEbBrsrsROwYe2TEy5RvQbvq9ceDPU3eMBQHXxUmoYVbFWW1jIfjgrcM3EYCxIZTzvq1Wf52V5uqmk7tCu1SDT4Yy+4nnaQ8HjihiyjkX+BpHKPW9wnlsulJbWzwUUjeRYr6a9aB+9DVt3LNH0he0oOHXg0afaAl7lcpM2szwcjHDTIqiYytaI+ZRWLCYZIXgNLLHn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2xyrmt+v6OExT7vPRDWkH4vfZfNPKrq6oeZrQ8V+fMg+S4IQ5r1eCxwyf X-Bogosity: Ham, tests=bogofilter, spamicity=0.374203, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Add a selftest to cover the zswapin code path, allocating more memory than the cgroup limit to trigger swapout/zswapout, then reading the pages back in memory several times. This is inspired by a recently encountered kernel crash on the zswapin path in our internal kernel, which went undetected because of a lack of test coverage for this path. Add a selftest to verify that when memory.zswap.max = 0, no pages can go to the zswap pool for the cgroup. Suggested-by: Rik van Riel Suggested-by: Yosry Ahmed Signed-off-by: Nhat Pham Acked-by: Yosry Ahmed --- tools/testing/selftests/cgroup/test_zswap.c | 120 +++++++++++++++++++- 1 file changed, 119 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/cgroup/test_zswap.c b/tools/testing/selftests/cgroup/test_zswap.c index 32ce975b21d1..c263610a4a60 100644 --- a/tools/testing/selftests/cgroup/test_zswap.c +++ b/tools/testing/selftests/cgroup/test_zswap.c @@ -60,6 +60,27 @@ static long get_zswpout(const char *cgroup) return cg_read_key_long(cgroup, "memory.stat", "zswpout "); } +static int allocate_and_read_bytes(const char *cgroup, void *arg) +{ + size_t size = (size_t)arg; + char *mem = (char *)malloc(size); + int ret = 0; + + if (!mem) + return -1; + for (int i = 0; i < size; i += 4095) + mem[i] = 'a'; + + /* go through the allocated memory to (z)swap in and out pages */ + for (int i = 0; i < size; i += 4095) { + if (mem[i] != 'a') + ret = -1; + } + + free(mem); + return ret; +} + static int allocate_bytes(const char *cgroup, void *arg) { size_t size = (size_t)arg; @@ -100,7 +121,6 @@ static int test_zswap_usage(const char *root) int ret = KSFT_FAIL; char *test_group; - /* Set up */ test_group = cg_name(root, "no_shrink_test"); if (!test_group) goto out; @@ -133,6 +153,102 @@ static int test_zswap_usage(const char *root) return ret; } +/* + * Check that when memory.zswap.max = 0, no pages can go to the zswap pool for + * the cgroup. + */ +static int test_swapin_nozswap(const char *root) +{ + int ret = KSFT_FAIL; + char *test_group; + long swap_peak, zswpout; + + test_group = cg_name(root, "no_zswap_test"); + if (!test_group) + goto out; + if (cg_create(test_group)) + goto out; + if (cg_write(test_group, "memory.max", "8M")) + goto out; + if (cg_write(test_group, "memory.zswap.max", "0")) + goto out; + + /* Allocate and read more than memory.max to trigger swapin */ + if (cg_run(test_group, allocate_and_read_bytes, (void *)MB(32))) + goto out; + + /* Verify that pages are swapped out, but no zswap happened */ + swap_peak = cg_read_long(test_group, "memory.swap.peak"); + if (swap_peak < 0) { + ksft_print_msg("failed to get cgroup's swap_peak\n"); + goto out; + } + + if (swap_peak == 0) { + ksft_print_msg("pages should be swapped out\n"); + goto out; + } + + zswpout = get_zswpout(test_group); + if (zswpout < 0) { + ksft_print_msg("failed to get zswpout\n"); + goto out; + } + + if (zswpout > 0) { + ksft_print_msg("zswapout > 0 when memory.zswap.max = 0\n"); + goto out; + } + + ret = KSFT_PASS; + +out: + cg_destroy(test_group); + free(test_group); + return ret; +} + +/* Simple test to verify the (z)swapin code paths */ +static int test_zswapin(const char *root) +{ + int ret = KSFT_FAIL; + char *test_group; + long zswpin; + + /* Set up */ + test_group = cg_name(root, "zswapin_test"); + if (!test_group) + goto out; + if (cg_create(test_group)) + goto out; + if (cg_write(test_group, "memory.max", "8M")) + goto out; + if (cg_write(test_group, "memory.zswap.max", "max")) + goto out; + + /* Allocate and read more than memory.max to trigger (z)swap in */ + if (cg_run(test_group, allocate_and_read_bytes, (void *)MB(32))) + goto out; + + zswpin = cg_read_key_long(test_group, "memory.stat", "zswpin "); + if (zswpin < 0) { + ksft_print_msg("failed to get zswpin\n"); + goto out; + } + + if (zswpin == 0) { + ksft_print_msg("zswpin should not be 0\n"); + goto out; + } + + ret = KSFT_PASS; + +out: + cg_destroy(test_group); + free(test_group); + return ret; +} + /* * When trying to store a memcg page in zswap, if the memcg hits its memory * limit in zswap, writeback should affect only the zswapped pages of that @@ -309,6 +425,8 @@ struct zswap_test { const char *name; } tests[] = { T(test_zswap_usage), + T(test_swapin_nozswap), + T(test_zswapin), T(test_no_kmem_bypass), T(test_no_invasive_cgroup_shrink), };