From patchwork Thu Feb 1 03:27:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nhat Pham X-Patchwork-Id: 13540595 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 082D7C4828C for ; Thu, 1 Feb 2024 03:27:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 186B66B007D; Wed, 31 Jan 2024 22:27:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0E4806B0080; Wed, 31 Jan 2024 22:27:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EC5E66B0081; Wed, 31 Jan 2024 22:27:22 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D78AE6B007D for ; Wed, 31 Jan 2024 22:27:22 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A03D7140DA4 for ; Thu, 1 Feb 2024 03:27:22 +0000 (UTC) X-FDA: 81741799524.24.F15851F Received: from mail-qv1-f51.google.com (mail-qv1-f51.google.com [209.85.219.51]) by imf23.hostedemail.com (Postfix) with ESMTP id CC7B214000A for ; Thu, 1 Feb 2024 03:27:20 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Pec8trfu; spf=pass (imf23.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.219.51 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=1706758040; 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=t/6d9JyQ3aGDZno7ndLmFvGN72VRjkltv3CVlEpIaB8=; b=HBES+sXM03hTQiDg/xg0y1sceubYcUTb0tvwtL4Dyo1zNWWPC2ylQUVRFic/cU3Vov7ngz J2npaUWhvKfPH7tbp7Rmp5a9Y/9soB7iAgg0y4BSRawwxhTkI6NXbLfWSuigoDdwaejUkx oz+aOYZ6kWoCfgUliCQtDkOHd+XKTwk= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Pec8trfu; spf=pass (imf23.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.219.51 as permitted sender) smtp.mailfrom=nphamcs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706758040; a=rsa-sha256; cv=none; b=0wP3EZz/M77DRBWz/0V0MEre8WZCr14mA4gVpk8pV1ebxaw3KzJ+UrsacG9aRg/obEUKUY mofAb/pqsGNDCaxpJG1cO3e7cfmKZpnZrRr2FRcW5r1FYpNFvTg8+QZ/NulY+sVDZ6fxPK oNBSb7F1jdvBpsJ6blQTSUA6OcLXd+w= Received: by mail-qv1-f51.google.com with SMTP id 6a1803df08f44-68873473ce6so2773346d6.0 for ; Wed, 31 Jan 2024 19:27:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706758040; x=1707362840; 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=t/6d9JyQ3aGDZno7ndLmFvGN72VRjkltv3CVlEpIaB8=; b=Pec8trfuM1khQbb6LYZFP68g1G9ru0tGKWYbi09eLfA8R1qm7atNmzzvtBhLXNUIS3 q4It3w92GYcPK4YyLA79p307iV0KX/6Jc8LgXicDTWk2xpG4dAdPmddxTGUB66ehgcjk SDYHTh3NswRxQ49UX0Bz4SaPa7SItm8eEL/OAXEo35TTK9dCE3Of5qea4/z+qsKE3U4q aydDTi8O4kDLNwnglopFXiZ9U39ageoAZ+wu/zFTNvVWUzL++komdwG40M/F2EfdRoIM J2OtjBnQ4E7MtyBy/73Vfzdj2Hl81/OvCHrdNM4vHSzpJqHL7EXTGped6F0e/xzNYBfB aD2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706758040; x=1707362840; 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=t/6d9JyQ3aGDZno7ndLmFvGN72VRjkltv3CVlEpIaB8=; b=Pfl9mIXR+dpA/UvFlLXPGoY8XVYgXdwhdpk4317jal7O20DkC8zf+UT6LaApXUPoC9 UZQutlI2gQUmOTuAoZkMSOg6izH1clXpfKVK3O9rTatQBdpfMq6Bzs8XhPg4EqofoYWu MzOl05eGTdXJFskOZc1JP95S0Ymn1qwiTv7A6sDf6Jh+Kbc5XUbRP3Ey18pJQF/uzbhC 3DozoAL+EqZVOWWWDmWqLqfXsTqz0ahxuzDnuraDXwHtmkeKTXMjJi4ujnTi42ok14JZ qUqalAPdL3zBSyaXZcnKHSB7JV6jy6GF2IPRNaLAupgb9S9Ha705ks4XN/MKZzhGfW96 ar8w== X-Gm-Message-State: AOJu0YwNvo+4LYwSbPZYXRAh2bCZVIeW+ddCg8h3SduER/dhOxQrvUJE PJ2A0Nb4Ygb7uG9b6kFyUBpg1xvjSI/5qiD3DxLzloEZceQmGJbW X-Google-Smtp-Source: AGHT+IHFc27RL7Utmjc1Pq/lujri1IbLrCkXvs37G1YNUuJnCajdoRhIpZd0pK9lV7z8xZOTUBO+kQ== X-Received: by 2002:a05:6214:d45:b0:68c:5a42:41a3 with SMTP id 5-20020a0562140d4500b0068c5a4241a3mr4098862qvr.34.1706758039796; Wed, 31 Jan 2024 19:27:19 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV6whcYy++TMlKNQrkTFI8cKX+Wo3UA1hSScb7Tc1JPnBdWZVCGfX5YDvtMENDjCUS2fxggT/fh+nuXMwlq5w+LJOEtZ6/oumbQvZK+XVj3PS3WsyNd6+OKpmte+UqEIHumJAkWvTEd1mzvgE6ALEy1C88UxfMWjofNWhzUZMTk1SJFd5ve21yQaMVwoQqDSrb/fc3wUhG2vbe2oIVPwP6kmW+GPY0lkh4AHPc4JwV7QhwBYr/nqm1AizcFjF6hsHJFwyaIAAK3gRiI6WODGEx9++F/eYrf0L8Pq3/X0tjDsU9dN8GeG7IqpccRSG3mXGAza8VcT5PMZzIMzbvZ9xoSdFiNrDpF9jQJCwL3/XA6rNFfBeO1 Received: from localhost (fwdproxy-nao-009.fbsv.net. [2a03:2880:23ff:9::face:b00c]) by smtp.gmail.com with ESMTPSA id lr6-20020a0562145bc600b0068189e9d3a3sm995855qvb.112.2024.01.31.19.27.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 19:27:19 -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, linux-mm@kvack.org, kernel-team@meta.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 1/3] selftests: zswap: add zswap selftest file to zswap maintainer entry Date: Wed, 31 Jan 2024 19:27:16 -0800 Message-Id: <20240201032718.1968208-2-nphamcs@gmail.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240201032718.1968208-1-nphamcs@gmail.com> References: <20240201032718.1968208-1-nphamcs@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: CC7B214000A X-R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x Pg62lxk78cSfmSTL8R8yDVnw4tNom9NMaMO5xVXzgVKAkNDjgqEVNLArKpDAnntVN16GbRMV/gGi3pQQp0mz4bioY5fyETC64Y7l5wTViuf9HiXdm0YieuHb/SeGvxH8rBto9KbSmHBHj/zlWeXuK3imCT3OYpsknBQ3meB1KvCFcQXBrx4XkDcksw06hYttr/EOkh0K3Tqz8w/Wj11P/Ox8N/DJ5oNdtBA/7uEo13QMPf4TR3qrOFzUTVvOVoV38q7rPWSfGBLlrNU6cxf1FO6U32WEUolQLtaAkDz8957GB7X5MqbsWsdss7t+MAoyq7RyrOwZzaF1q9pHZcygu+MDOU5RuVSreFIksoBh4qLLT/uKDTEzcJ5N3zM4vNx9FSk3c5s5oyFYMbeDLHIxAjfnQq6AhkXzKcrgpYHuZSEf+m95fkFIrVGFMILuIRMWdGiWbPEHLjugzxJaCO3wtWMUGMeIS6u5pnPaDJ72KmZ91IILcy7kI7o4T/b8ZQ19cBnfP X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, 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 fecebfc4c0dc..5f60faaefaf2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -24396,6 +24396,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 Thu Feb 1 03:27:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nhat Pham X-Patchwork-Id: 13540596 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 F36F7C47258 for ; Thu, 1 Feb 2024 03:27:25 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC8B06B0080; Wed, 31 Jan 2024 22:27:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E02386B0081; Wed, 31 Jan 2024 22:27:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C54B96B0082; Wed, 31 Jan 2024 22:27:23 -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 B228E6B0080 for ; Wed, 31 Jan 2024 22:27:23 -0500 (EST) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 7C3C81C0420 for ; Thu, 1 Feb 2024 03:27:23 +0000 (UTC) X-FDA: 81741799566.21.A93DDA0 Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by imf11.hostedemail.com (Postfix) with ESMTP id B4DD24000C for ; Thu, 1 Feb 2024 03:27:21 +0000 (UTC) Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=l9AmxyLe; spf=pass (imf11.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.160.177 as permitted sender) smtp.mailfrom=nphamcs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706758041; a=rsa-sha256; cv=none; b=zzc61Ww4KRzT/Tka7l9MlsectUnt6tHqlGk2j5D4vNNWY6MISLaxkhfA4LoGpusO7SM3j+ Xz9OJ6KvAi1NESv1QMZh+LrOnznafHcQgP4XQsyivJiMJayWKLkA1bazUoF2+c5C0y3tNw m0bh9pX8P3825TqxSvquIdDaiS1mqL0= ARC-Authentication-Results: i=1; imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=l9AmxyLe; spf=pass (imf11.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.160.177 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=1706758041; 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=Q/miaUQm4jLpvoTiwJggIG5e1/hplwgOe76n2wmfLCEv+VKpRQOMN7hyW1SF0CtTFD3pmn Z+xwi52MKIpgLPnNO4fYdR4zmIkzypSrz6akpCE9D1AV7gOofPGpBXBAqxhNG6GEZnO5/d wh0kRynIURTL9TlKxBQOagSulFax+jk= Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-42a9f4935a6so12596711cf.1 for ; Wed, 31 Jan 2024 19:27:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706758041; x=1707362841; 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=l9AmxyLefs8piA1QG91QCUKPb/yr8G1z+8jINaftyWv34FBT2NCzVFwF1sQ7bwsXSj FyDyfwpZMzi0n2fHKxDyyKESJRb531Lgti9VsK1ibONLI7k9CI+cciToggXmZG7HW1si yBkxEeXDolXIpiYuzfsw/xY1vLNIf1PDMmLVNAtYUbxQ5OStMmOdGF7sVy84KEvUfRFi idQtQIHMBeP/BpcoQWYR7zG5zv2E49zwIBxeWbk/oanxiFxE3H602WFfyp7G4vLDzHC8 5D+NvIqB4BwNtRiAYmu1duvuSb0xpkBFUsHbaFD5n6EY5OBfRizBDaInM19TQWuC7ZOG Y84w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706758041; x=1707362841; 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=PJhCe8XaCm/YB785Wiv+ANJwEaRlwaZb1KnxJmlembUH1CkloE7IQm4sGHcczYSdKI D2ulU6y0fJVZMJQS0pwUWG1uXnXimKUlPXOSKbKk17CzQ/kVHXtpIbS+YT+5aPoSBxuP wwHu/FBDDjIP4Al0ZEIj2rYNVxeS7vy5CqvAQ8OsoGQzQNhXSpkUxFY7A3bxevvIIpRW /T2gGV8T7A8H7xOHMjZY7D+MKCxR6ZjUTcESG29h9CVw43dgfCgZWUmR0D/Qi8pxfS0R iG40KsLaeUPtLtqdA3phmExSfrNm/RvR2Cx+ke8ZcN3rdjRBAYRWeyf+iX7vcy1qohr+ Thvw== X-Gm-Message-State: AOJu0Yyi0mYqwZeTyMTed3VfeK5Wdlilaw3DcV2X2YI3g4ZGQatk28ft 3zCw5X0j1M9TRVatd0/1pT4gSJRJTGpgPp71/ueHeBjXIYGmedtw X-Google-Smtp-Source: AGHT+IFqcvsUMZYFuYor0H/CUk+pPFiTZOgLITK4N4LX0rCJkB0og9Dc0BMcAnEw/g7377tApIxDQQ== X-Received: by 2002:ac8:4e91:0:b0:42a:8be3:7bf5 with SMTP id 17-20020ac84e91000000b0042a8be37bf5mr7486386qtp.9.1706758040803; Wed, 31 Jan 2024 19:27:20 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUhQZ1N2tT05OGhr6lKJZ4MS4C5p6jdBy+kND1VAX4ngoMA+XrkdOs3Jg744crNHZzyvCprOvmjiuLtJzz3s8TbHfOILCF+L4ryeOSPQNu1G6rpAVnaTf5EwIk1236AKtJhY9dC5cAKJbkFeqzpU/XIe0SUvDzU7pGsQ6VHK6SWcSVXiGapUjqUPDr1AQ7m5yFVtOrXzWxAU6wW6GJDLOBsozLdNn7sOsPvRXI2WvFx8mYTD+AAqahUTV8tuAj/VA+zy0cKRWOt7vHwyvz+8xgfRQ5ZdbMFJxtZgajN7CPp/hlvE5+iuDy9xqx5rLrNZDIRDVEVi5j+zRX8ITtgcn8lbyXh5vY/HL90aQ3r/1lnDwTOzCt/ Received: from localhost (fwdproxy-nao-008.fbsv.net. [2a03:2880:23ff:8::face:b00c]) by smtp.gmail.com with ESMTPSA id ge10-20020a05622a5c8a00b0042998676bc3sm5570137qtb.43.2024.01.31.19.27.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 19:27:20 -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, linux-mm@kvack.org, kernel-team@meta.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 2/3] selftests: fix the zswap invasive shrink test Date: Wed, 31 Jan 2024 19:27:17 -0800 Message-Id: <20240201032718.1968208-3-nphamcs@gmail.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240201032718.1968208-1-nphamcs@gmail.com> References: <20240201032718.1968208-1-nphamcs@gmail.com> MIME-Version: 1.0 X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: B4DD24000C X-Stat-Signature: k39d34xjgqx1h3wt5rin1k43rdkh5j8r X-Rspam-User: X-HE-Tag: 1706758041-727223 X-HE-Meta: U2FsdGVkX1/CF3JskxllC0oAfsMVe6DiKwJqmTUVpc/Gvofxnuq0VluoV52MplU3JHQvZUMtzKzRRvyBSCRR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qC187JDRdAJ2NjsAlR5c/synrWeIXnUqOKLMc8HdXFVwxvIjK/vqxLanffuSzfJIhKuWaHYEiJdpUeiKLj5WUkDOdr2bbZq9ReQDIrUj5t9YjsJ+Z5BbUleyJZrx/39qEX44FedVMM16eQQNtoA17X+JQQkLqkZa2HZ0bQMkPlu0TGRAJ5Agc0Bhi4OUV8bD+foY21u48HFGusE2v8yltjr6h8EK9RXQECCxg2QL5Zo6F2enOcUi+zzv1DtTmoGjoYgQgZ6J/Jw/rrtfOMHgCT+Mji0wcSHfmL/6BNS5UgINw/2AkUOj2zXQbjj+v5u/OMY8qRbuQlzF4xI8mFsuyTNobkw7t7ly69QMa/8AXhLyOQKRtZewf4IdOdabgSpMs8yNDIIYKRU7/zkwSNNiYf6KM1jtDrt7GpwOwZDeLRSorrHmSq8UXczYd+A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000108, 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 Thu Feb 1 03:27:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nhat Pham X-Patchwork-Id: 13540597 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 7F85FC47DB3 for ; Thu, 1 Feb 2024 03:27:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EC9358D0001; Wed, 31 Jan 2024 22:27:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DB47E6B0083; Wed, 31 Jan 2024 22:27:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BE1E08D0001; Wed, 31 Jan 2024 22:27:24 -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 A06A56B0082 for ; Wed, 31 Jan 2024 22:27:24 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 6E64D404A1 for ; Thu, 1 Feb 2024 03:27:24 +0000 (UTC) X-FDA: 81741799608.19.4F859EE Received: from mail-qk1-f182.google.com (mail-qk1-f182.google.com [209.85.222.182]) by imf06.hostedemail.com (Postfix) with ESMTP id 9696C18000D for ; Thu, 1 Feb 2024 03:27:22 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Wvti49mn; spf=pass (imf06.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.222.182 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=1706758042; 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=rTqBj0H08VxjpoFeh5ezYndc7+HSVccdU5yqVd6FGXw=; b=vr0/KMMhLxLaDHYXVJqxyvNK2w9d4G9+e7nf3PPTQ5V1nj+hJOcjGvO42Kfw1dzzct7Ac0 0uRX5WkqthmEHlqUCKiW6vAL/1LTfgvld0wYBvZvR1j0dBfIQFle1gauOvjAsEUZt0oiEL OiMeEAxJh0UVRIEc4/vJssnywN3pik4= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Wvti49mn; spf=pass (imf06.hostedemail.com: domain of nphamcs@gmail.com designates 209.85.222.182 as permitted sender) smtp.mailfrom=nphamcs@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706758042; a=rsa-sha256; cv=none; b=yFBI0iy/jCcCYlfuGVfIs6zA3fFWdgp6GqVjloot5Ag1r2X1DI8p2BkJ/K0SyMqYyf/TSe SAEEIHTpSQW/5o0IptbxmlKlzqxu+Bn08aOuG1bceG7UZi6PTI2seMIQYtMXWdypACTsLV s1P4WyYBfFggLdjz26N3EVuQv9Fgd4E= Received: by mail-qk1-f182.google.com with SMTP id af79cd13be357-783d4b3a00bso35896285a.3 for ; Wed, 31 Jan 2024 19:27:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706758041; x=1707362841; 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=rTqBj0H08VxjpoFeh5ezYndc7+HSVccdU5yqVd6FGXw=; b=Wvti49mn49MR89gDRYq75kgo4iiTiR/FxAgCfO0lNkc1l9lUQ64ffFAVWMVWOSRn2T +P71bgekkgK796BaIVTwIzbRMnefxRLJQ3q29rEmdEXIv9ZjCp6o066i5dGDUshbvsqM YXy9fHXcwCcwRWT09v5tFHAnox7P/W/eDlpxVMlmCTmYDYxEpQF9WyLaSNWHrWzRypGE +2T6ptraEkp6/+qfMe/Q0Bx8p2zEV1dTlG47i0fSivT8Zav+A6Inr506cQoH8Kt+uBxX 8Hl5OXTo2Nd+0I7g8Y9AOk5NIHmnmIr5L8NwQhd5c4r5bxfKh/DjeK2IgGvqHQGWz3ZT KqBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706758041; x=1707362841; 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=rTqBj0H08VxjpoFeh5ezYndc7+HSVccdU5yqVd6FGXw=; b=TdLFuRXVsxOkR24eqNDcB92cC+PXWQSL9cE6q0Vpa0UziOS3KtjP2/KWB8XTtjJA3j PQoxVy8eOVc4jpgj/3vzQJ/frG9YYLco+6/QAV2AC2+k6bEPmvnIbIJEygZnFU7oI9kc /YX5WTsHtTKSV0WAbGru9As4zwJnmSfJ+T7HJFXkqZNffu89Z+RjkaGxK3D1kWuIwROj NW0yaZW6qaCZZJ3mejUAwj4v5xUrqPStaVI0elzVF2AB2DloHq7bdtTHnqn9INU7H0PK mlj/Bo7Q9L692OTfEDQXZ0t605n7bLklsIryx4LsPaT+VxAUhWJpJjdCGotbJnUz13if nKZQ== X-Gm-Message-State: AOJu0Ywi/K5x1olBP2p2sFg8GFk2zOyORZULJaD4UENJRRP1bGpkV0LM 5LJ3fQskeIKDjZEWYzq+3bMrWBFe32kssmy5M/A8U9rEur5kXN4a X-Google-Smtp-Source: AGHT+IHPWXSjkdUZuigp/9B7j6ivfpKy5HxAUMa6O9hLIMzhBIt/uWnFjXMQetpqhcvAu9PSMKwhVQ== X-Received: by 2002:a05:620a:4148:b0:785:46f0:615b with SMTP id k8-20020a05620a414800b0078546f0615bmr358625qko.2.1706758041672; Wed, 31 Jan 2024 19:27:21 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUIv71tJwO29OMitKPFnpPOCXCL8BuVktI6doG1tJVc7/qR+y0O1AXR3wBOmsC4Qpffj7sUQ/KvOHDJ3cjhityaWK8c6DQta2mok58PQKzyNMRYi0NBxE+fudr705gyldiLvtVDxeVD4Y/YBHb0b/QTNJBIXuB6UgcZyUeKMza5ekf49cqVqrwZ+yFdNzpD4eR3WySWDx0k6eHPjVEjtMAYQMMFpHdujzSNJ24YQgSlib3EdrjukJE9XYj5tQUTBP7eM86wjlW/Eo9XAjgXgVqReu2zzRc0V4aBxOGW8RQSM8/9+pDlticWA+KTxQANd6ZrLRySCqgVqZR+0qhBBavYdTkV8LgIibWRilyUHyT/2lAZKZI/ Received: from localhost (fwdproxy-nao-009.fbsv.net. [2a03:2880:23ff:9::face:b00c]) by smtp.gmail.com with ESMTPSA id v18-20020ae9e312000000b0078535190648sm1450417qkf.67.2024.01.31.19.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 19:27:21 -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, linux-mm@kvack.org, kernel-team@meta.com, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2 3/3] selftests: add zswapin and no zswap tests Date: Wed, 31 Jan 2024 19:27:18 -0800 Message-Id: <20240201032718.1968208-4-nphamcs@gmail.com> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240201032718.1968208-1-nphamcs@gmail.com> References: <20240201032718.1968208-1-nphamcs@gmail.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 9696C18000D X-Rspam-User: X-Stat-Signature: dozgywzum9frj1dqw5dnkey5ejbd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Xqk/uo0UQX0aa3zaNsU05x495pGCeDDukLAd7BPvk/AKYQhTThHMuWuauB0I20U0T9tAvljj6BcIb2c1ud5jY+1Ahf1NfoyNCu8COhltdzz7deg4LB8FrEL6f6Ccb0PCGl89yZZbgV1tNaoALEJuqUBgW7lEDDh6YKx0YnFzFoUS4UXxU1p0FTQceG0XPZCETWIOwky6tMUJX6HtcqXqC7oHwg4q8TVv7kEJM/3V897uQeba7Dd19/iAakp1Hyg8gHYvTi0UZavu4Bx3dc2DD01shHWfWYIpRbiCIQYojGEkfWA/SU8d4/bYtrXBw6YJT/Dz6ZdGzBgh7F0+n1JUN2n0qFUSxvorjJ6qNPVAGgurMVUdr4C9Z4jRcDRwfF0Lck2bji8siAIjfr3NgO32YazFJpKjwNk731pQLzawGMvEEujU8Af/qwZGyvaeJbI2yQWuKXKhKdIdnTjC2Pn7bmOQ3EpWVZRxYVbFBNVP X-Bogosity: Ham, tests=bogofilter, spamicity=0.429785, 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 --- tools/testing/selftests/cgroup/test_zswap.c | 97 +++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/tools/testing/selftests/cgroup/test_zswap.c b/tools/testing/selftests/cgroup/test_zswap.c index 32ce975b21d1..14d1f18f1098 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_bytes_and_read(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; @@ -133,6 +154,80 @@ 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 zswpout; + + /* Set up */ + 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; + /* Disable zswap */ + 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_bytes_and_read, (void *)MB(32))) + goto out; + + /* Verify that no zswap happened */ + zswpout = get_zswpout(test_group); + if (zswpout < 0) { + ksft_print_msg("Failed to get zswpout\n"); + goto out; + } else if (zswpout > 0) { + ksft_print_msg( + "Pages should not go to zswap 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_no_limit(const char *root) +{ + int ret = KSFT_FAIL; + char *test_group; + + /* 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_bytes_and_read, (void *)MB(32))) + 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 +404,8 @@ struct zswap_test { const char *name; } tests[] = { T(test_zswap_usage), + T(test_swapin_nozswap), + T(test_zswapin_no_limit), T(test_no_kmem_bypass), T(test_no_invasive_cgroup_shrink), };