From patchwork Tue Feb 13 08:16:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Johannes Weiner X-Patchwork-Id: 13554656 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 746C6C4829A for ; Tue, 13 Feb 2024 08:16:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0A0F56B006E; Tue, 13 Feb 2024 03:16:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 05A6D6B0071; Tue, 13 Feb 2024 03:16:43 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E59406B007D; Tue, 13 Feb 2024 03:16:43 -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 D34DE6B006E for ; Tue, 13 Feb 2024 03:16:43 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id A98BB160908 for ; Tue, 13 Feb 2024 08:16:43 +0000 (UTC) X-FDA: 81786074286.28.6CDF94E Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by imf16.hostedemail.com (Postfix) with ESMTP id A8A3918001A for ; Tue, 13 Feb 2024 08:16:41 +0000 (UTC) Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=kbSuBxSY; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf16.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.214.172 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707812201; 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-type: content-transfer-encoding:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=K+aOrCJIUWm9gZNxG5N0dygbdBPzUIeW3edWmhaMQB0=; b=U8i5LnD7SBBwLOWGQZQcaoFsxNF+CwHiVg+G+G4yGe+3iQ+qmPkPJbrbPhS62FTq2mkzoP SEV1XMXLA0j5NleeKDAYl4b6f05cKwvm9+EXtpeyMXMR4sTWmnSv5ttS57e1aNUPnmbafB zRIxe1oTTZjFOhDn7yHSyhWDjxn0xm0= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=kbSuBxSY; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf16.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.214.172 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707812201; a=rsa-sha256; cv=none; b=R6dWuB4z6n6rqw7iGjgkauevvCGjGai9o0UgA6jKtXP3q2VId9Bb0OYd/QByRjKdkIQYHz IUX4GtaA+wSzh76GSvL8tt3rMI9vkDF3HDgPOFfqrPq9SIRvFTHn/5PUhF76mSIXiBmOaL ov1nkzbZnY0EmcUxUcPhR8n7uidfuow= Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-1d8aadc624dso29902745ad.0 for ; Tue, 13 Feb 2024 00:16:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20230601.gappssmtp.com; s=20230601; t=1707812200; x=1708417000; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=K+aOrCJIUWm9gZNxG5N0dygbdBPzUIeW3edWmhaMQB0=; b=kbSuBxSYyIRLQaA3dovQlCGOEsa9HP4NYlkp5dzU5PaVXuiDnJJKd6Kry3x5jMaJas OQIRKg8o/w+B6cHdIKTUQq+axOziFdH/+STZuOkwpj+JoKb7jeg5zj7dHsix8LeCY541 fcZN+Nfks6yq8/u7SqIFu5OIOX8ADR+EI2G7/i1rh6wh0/3sMQEmHWHC1hGrQryPmo7r QmFcIMnDegzb/8J2bDQ5j+JN6Rf+dLZcrg/3j66vZJHH/K3F8sCYIje5TGpb5HwiGXuk MPwoZdLXssYzBTHAxbfiZ606R9r0QlPwA9WMK8vZ0G8+5Fc4okfBkO7MnZWb87mpmOGt x16w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707812200; x=1708417000; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=K+aOrCJIUWm9gZNxG5N0dygbdBPzUIeW3edWmhaMQB0=; b=RIZxEAfull0FQk/2kOpyUmNVDBe2cRa6s1fBD+i6CWqJE15/NFPaVUWOMTw3V9Wu9N QIdLu43gq53GkqkSY4Sd+SCGNYaiQCbuBsj0DcjtZku+admXMOtDxJScjh6mrRAe+x/T 0+4SX8VkyI/AECU4Z77JvwkeYbaOo/R1tYYsQnfHdYnJuI4SCVNty6qnYGpbfEGaHVFd hxxX0s6lVndx2ggSR8DvZAqAOreK6siMBCeX18noiMx36ZtqRtbhDCiSEDhJdh0a8fSq Kex9cBA79c4wKhILjAx1ATURo3d64PSvCb1VIvpbtyGo678r3gU/X+LUXPrRSVo/UX4/ n2+A== X-Forwarded-Encrypted: i=1; AJvYcCVrkuex/p3BCrEe+0MImXQRpha/bdBUTTBLjaabd17kdhIVIxkqFLtErRL/XjLg1Tcvhcoy6H1wWQEsOhonGsLxFm0= X-Gm-Message-State: AOJu0YzGH4oxwJoL8Bl75BGD4ihU/EJlYVolJzzuHM44oAkBInie/1ZE vHyZRj1iGPLck0B6HJ/rOoplRBKfeZ1WZq70CZdY6KvBBz91Nev1dXN+sfP7Uqg= X-Google-Smtp-Source: AGHT+IHN30FOf76CIlJ70s4RXG08RhVc6llnrHToPYD4rI38cBg1UPCeufOMlRlWoRo7BYjOTkacFg== X-Received: by 2002:a17:902:784e:b0:1d9:bf92:f51e with SMTP id e14-20020a170902784e00b001d9bf92f51emr7463057pln.49.1707812200433; Tue, 13 Feb 2024 00:16:40 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVYaiB4sJIlOpc7RRe3eZfg5f90Re+8kea9EJomeq8BGe9OkX8RGdoQT5J50iUT4DchvymvZt2277c1SRur2DQ9jXLBwtcktzhgrlV8inuxHYziucR2B3sGPqnetqihS6EsrH4vMPkRLcDzps4GERHVa7pMGkDlYVF9fe0RjRJEDGeIzxi+CowcX9zmvVf6CbZN9mnquFaARgFq73e3EWur064bF3Vyf4CdaWMcDfkM9NP2V5jTy4dwJuDUoyk2WDbt9ZwEE7n8lmxvTOAypu74vdH4h6mdc8bLm9YECEK4pmm48e0YFKKW2tuS Received: from localhost ([2620:10d:c091:400::5:b0f]) by smtp.gmail.com with ESMTPSA id kq5-20020a170903284500b001d8ecf5ff6csm129187plb.147.2024.02.13.00.16.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 00:16:39 -0800 (PST) From: Johannes Weiner To: Andrew Morton Cc: Michal Hocko , Shakeel Butt , Roman Gushchin , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Jonas_Sch?= =?utf-8?q?=C3=A4fer?= , Narcis Garcia , Yosry Ahmed Subject: [PATCH] mm: memcontrol: clarify swapaccount=0 deprecation warning Date: Tue, 13 Feb 2024 03:16:34 -0500 Message-ID: <20240213081634.3652326-1-hannes@cmpxchg.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Rspam-User: X-Stat-Signature: fkujmpds4kk5o41ca7wa3hyqdix7m7ds X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kfYqSGcTOjsWpT8S7mJVieWbIPlY1I2cQFM18Vub82uRM6lgeenhIUAp9li2AF8H4fKhBB9h9VETV5IZzK13Is7thVrkH8wS98VI7ISFXQYjFwBDM2gzxhsuiIRONNuQXfHktWJfiQwVsowKU/kvcYHv/FCqIbk+uYWe1txAQRtpEyE53iS5CbMG5dUHqhFGfWp70tOK5UjZzJczFndjbQ2AQ7JGGPljoQtyAd+vE3QeJjwRNOgQ1H8nuFPHQRgGGDPGm1dqlP8OGdD3t12bvR+GpP4t3ykWuOpfB0Qhyy59ksLES1zOQYHJuZOf4HI6e4pdOUCmBT8zN/YUN5clP0mnd9uvS+Gm44GqFN77FjWNSMvMfXil0n9obBUGTNhpIZpWPj9qQNo67W0KgT9PZg2BgZcy+598ORS6AKtcD5MNpUCxRKCFecMuhlbFcy5juI/COHZD5Fa9aRmsuAkCgP7HwZOYVCS3yVXAa71kRN18RUZ2xmyGaAuCW9Nmqp/MPXulQjm6YObDUFBquaYXXrTJHWipIlqSwE2KshWPt8tAO7NES5/QXlGWY82dXRuQVZpIoCwN6PHmd8lxiPDfvhMyTetZ//BleaiX0PmjxqZU+5PpaHSR8zDq6UEsC6mD6+RV/7H3WD5rQYU+K8Q67rnCPPBSHOSFNigI= 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: The swapaccount deprecation warning is throwing false positives. Since we deprecated the knob and defaulted to enabling, the only reports we've been getting are from folks that set swapaccount=1. While this is a nice affirmation that always-enabling was the right choice, we certainly don't want to warn when users request the supported mode. Only warn when disabling is requested, and clarify the warning. Fixes: b25806dcd3d5 ("mm: memcontrol: deprecate swapaccounting=0 mode") Cc: stable@vger.kernel.org Reported-by: "Jonas Schäfer" Reported-by: Narcis Garcia Suggested-by: Yosry Ahmed Signed-off-by: Johannes Weiner Reviewed-by: Yosry Ahmed Acked-by: Michal Hocko Acked-by: Shakeel Butt --- mm/memcontrol.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 1ed40f9d3a27..107ec5d36819 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -7971,9 +7971,13 @@ bool mem_cgroup_swap_full(struct folio *folio) static int __init setup_swap_account(char *s) { - pr_warn_once("The swapaccount= commandline option is deprecated. " - "Please report your usecase to linux-mm@kvack.org if you " - "depend on this functionality.\n"); + bool res; + + if (!kstrtobool(s, &res) && !res) + pr_warn_once("The swapaccount=0 commdandline option is deprecated " + "in favor of configuring swap control via cgroupfs. " + "Please report your usecase to linux-mm@kvack.org if you " + "depend on this functionality.\n"); return 1; } __setup("swapaccount=", setup_swap_account);