Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2907648rdb; Tue, 13 Feb 2024 00:17:38 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX9Wfy5VgmdJ3NrurnHApzW5EQkESvjJUjSGmfb+0HRU2jDmB5Nh6bhoGV3gzK6Y5G4Ly3DTuvuyRDpGzl0H8PtKYLGZYLmYBllv6Oi3Q== X-Google-Smtp-Source: AGHT+IFBf0N7pKU/6S0Ou6TZSeaN6uO53d79YLmQXBVHEJrjm9sBR/teh/HtJroqOYxo5PPcNQ77 X-Received: by 2002:a17:906:168d:b0:a39:4e74:b30b with SMTP id s13-20020a170906168d00b00a394e74b30bmr6461116ejd.13.1707812258496; Tue, 13 Feb 2024 00:17:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707812258; cv=pass; d=google.com; s=arc-20160816; b=uSPrOSi4u6zip62q3U4ajSFJ/yHywTsBRZoTD5xRPbKhT/Db9Cba9iLi1A+HwZMv+O NeBw1L9BfblxmEdbrhMc2/H/gHVL1zZht3vA3k73tsrYyfe6iJZXr3ChjcSX6/olOO9x QhSEdUqWxaEku7phTXKphnAl6JP7uOFdol/ZoHfiFWsh998B91p0OO14Tll9wGFpwhfc csD+4DR2Z0liUzqBYquLLfGagEZxlB2G66ZVRNP7LJJ2UTwyItoZHEQ+bh02F9DajAfc J8vqeesckUjEgMe9FhYSwcVIqWqiD9P6i9YOBvcYh+KF7SkCOucGWE1CCDg25Cy0TUIZ 9Z1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=K+aOrCJIUWm9gZNxG5N0dygbdBPzUIeW3edWmhaMQB0=; fh=JxI+0A7apTm4Jov3j+QygKsEOC2HLhsyYmZsqbptbBU=; b=g1odxXN82WvHzkH9fFKz2MUNhxXeiG22xHWoc1ta9HkDwTyJ4kXEXgqsUlTmiKzExt FxCYu/7Sx2Z5CylhLtp37SJeGjZnJTu1F4+sYo2u/rJLTwJ7FvHy1qa6rpmq1YnF80Lg U/Pv2F4XlUmm0EsfJ7wkF4MNrWLJDMUJZoziOan2Ty/jH0Z+R4hwvxpAkHJi3s/2E6ZF I86i73qGhlLsFLZcyPFrifjw6L5n0csy0ZBn4rY6RoPUfcdrYf2bf4OHcxxPTxyY5VZg XZXsX0ySjY3qdwerMvjx5HZS4SfyQmQC4Q+7hHRaBTH0V44BPMNwznAlFjF4VXtfyWKG Kzvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=JTDqkXlM; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-63083-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org X-Forwarded-Encrypted: i=2; AJvYcCV2rR5zNBZDlSdWcHeNZGz1s/Gq6D4RWpdSztTfLei5VSUKAgJ6xq1onOmwNpoWGKuoJOByiWqPqnTL/2STiA8k5FzKZnNiVAxfjIJPsw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x24-20020a1709065ad800b00a37b5c25106si976515ejs.534.2024.02.13.00.17.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 00:17:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63083-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@cmpxchg-org.20230601.gappssmtp.com header.s=20230601 header.b=JTDqkXlM; arc=pass (i=1 spf=pass spfdomain=cmpxchg.org dkim=pass dkdomain=cmpxchg-org.20230601.gappssmtp.com dmarc=pass fromdomain=cmpxchg.org); spf=pass (google.com: domain of linux-kernel+bounces-63083-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63083-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=cmpxchg.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3E5971F2148B for ; Tue, 13 Feb 2024 08:17:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id AAA06224D6; Tue, 13 Feb 2024 08:16:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b="JTDqkXlM" Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3774622334 for ; Tue, 13 Feb 2024 08:16:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707812203; cv=none; b=RCh2K9F1R3jv8bXZxsSzOhJVAyq51f+BZ7DGIlQe/MBc3scvOU1ZAG1wlu20OtITABkPHqY6AjG6cZK120Xift4WjcKbb5darjOwE2Dqk6gKCRCcDTYsh9G9rWPk2Gudk3j5xVdw4po9TLz+JfAcKBSgX7laPpKvUFNgLLnuKCc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707812203; c=relaxed/simple; bh=pUSVavZmcjyYbi6RShnaW6jH3HO+mvOqqtpuCzNxeUU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=NgAATqm0+NckT6saCAzOUhvdc9a9JBmVUeS+deTi5HF5j6DM3OcVihk2Re4+Ckm2Be2kCGJH18x/hiw0lSwpAQ1RNFGybzOZ1OooOGJcjltOnwNNK0DeMWSOmeHF++9fdlcDyBcCohg6+goDeFaJon50U+9qpmkAfvpuYmCM7vA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org; spf=pass smtp.mailfrom=cmpxchg.org; dkim=pass (2048-bit key) header.d=cmpxchg-org.20230601.gappssmtp.com header.i=@cmpxchg-org.20230601.gappssmtp.com header.b=JTDqkXlM; arc=none smtp.client-ip=209.85.214.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmpxchg.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmpxchg.org Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-1d8aadc624dso29902755ad.0 for ; Tue, 13 Feb 2024 00:16:40 -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=vger.kernel.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=JTDqkXlMw3oFhGhOQ+xYUcspUqxYWHU+vROYhHI1RV/tvZww1CAalRYRXImLPYCbMU b9S24yMYmRMWfo0DUT0kDz2zvhJ3Zwf2Q26tu2nfbdD1xBHahtB9vJDOQOVmucph3Hla sIkq6LU1CgouoGHOOD32v1BnW6/MsKeq/P2LJTD2rEnD12OS0hrvCVC7qch7hZj46Xdr 6AY9zXv+axAXLrYnDGLxqDVY4BFMCqs5NQwDdOcXouGeZgFfAOkzx9/5Qok6jKVl3jIE qKW5O6whncjCORccYbwfKlBXBst0tPljWEsG2YeaWWaRve46RYbftEcNzCXXsYctEhkq ekQg== 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=P1zRvwT+bLd3ljh76RXq3MZcG/XwCTMplBboIhlZFWtWMyLSx2j85eFxqPq+qgGu8T UTxFkyJrm//AZqf+47nQKSc/m69yavugptRIDisf0h9xS1w0Aq+W7n7DN+gt+EsM5Ufu S5F9dhahgpo+7Fy2AKnqPwLxi3h2ShOKgV/YVl2UM5bsP9e5YCOpJPRK53LWQjZUHs5n Nycuj3Cm78CZQVsWrpMVK+1O31J5DHCzTUswwAgNYNgS7Jykhw35+Mu/BbeTjp3d9kwX n6H+yQadaq6LcXmdbJQf9a6WLdc2TjKddRGRRGEJGVpoJFJVKqhWGGxNpMaVaWsRQ3Vs 1AeA== X-Forwarded-Encrypted: i=1; AJvYcCUU9hkxM0EOIunsINhGOfFdvVcu4Qvh6NwVDSbGLmddJ+hWEAwm8joJ9d6M+R/e2aEJLq+MywV/0Dt4kPNCBRGtkrB9dIVOwVaTY/c5 X-Gm-Message-State: AOJu0Yy4LjH8ewelh08RPAXo863x7riaHu2CJvs9zDu7BZP/KtlVSAKP SrtVPjjsCeIukvjkPblfsbiMq7hasgM3ZBVowcuKTGLcRN+b9TrcOvQRjuR3euU= 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=20Sch=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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- 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); -- 2.43.0