From mboxrd@z Thu Jan 1 00:00:00 1970 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 26F5BC48260 for ; Tue, 13 Feb 2024 08:06:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3F1656B006E; Tue, 13 Feb 2024 03:06:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 39FF56B0071; Tue, 13 Feb 2024 03:06:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 268856B0072; Tue, 13 Feb 2024 03:06:42 -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 13E786B006E for ; Tue, 13 Feb 2024 03:06:42 -0500 (EST) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id DC947A20FF for ; Tue, 13 Feb 2024 08:06:41 +0000 (UTC) X-FDA: 81786049002.19.6236886 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf02.hostedemail.com (Postfix) with ESMTP id A615580013 for ; Tue, 13 Feb 2024 08:06:38 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=o8LN97yt; dkim=pass header.d=suse.com header.s=susede1 header.b=ssj4ZV1g; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf02.hostedemail.com: domain of mhocko@suse.com designates 195.135.223.131 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707811599; 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:in-reply-to:references:references:dkim-signature; bh=KAMRXtjpYyHVpvckdQEc5tvnq3xMIQmwN/y1JdVInwk=; b=zpQW5ipfn7omIAUmU3i9LsxA2AstbKlPWZUxEhx8dpyBJ37QqUHjltPr0IXypa+Nii9r2I +o1nAJBqklQJAXf5pniHT9Vl6CxkzvTCj9f+GF3VhE1GUvorvMoelfzMkfQn7j/1iZ0Hcg bILGMf4JQNUqBV6JEgtuxnuCg3aPCGo= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=o8LN97yt; dkim=pass header.d=suse.com header.s=susede1 header.b=ssj4ZV1g; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf02.hostedemail.com: domain of mhocko@suse.com designates 195.135.223.131 as permitted sender) smtp.mailfrom=mhocko@suse.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707811599; a=rsa-sha256; cv=none; b=7SH2PsUZxvriShsnVfSG1IRG7j1tvMyuXDe8aXWSO/BQh+vRoZtfXkDuTyf/ep7pcHzwdh flB9Acd4VLFR9KZfxgi9/Rd/MVmZXjhh0XvpcrrQeoGDrFOkheKtpPhTsINGHYtnM33vVE HA11IfQYAi81PNmagMHe8tI+8ZcxdPY= Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 79E041FC11; Tue, 13 Feb 2024 08:06:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1707811595; h=from:from:reply-to: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:in-reply-to:references:references; bh=KAMRXtjpYyHVpvckdQEc5tvnq3xMIQmwN/y1JdVInwk=; b=o8LN97yt/JF5HWY/5DFaJiUdHAsY8wbi5HmK582rkyjBZzJGnuKp8ksbNU3CnDldVKx6ce +zb3D3y/cKGknMUQUvBHOUjQX2s/cJ90yYregl+ojCkELxlsUpX+0/6yyiTOg100VmyLYA Tp2PAaA83379jsj1cxaCo2SRM8hqW68= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1707811594; h=from:from:reply-to: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:in-reply-to:references:references; bh=KAMRXtjpYyHVpvckdQEc5tvnq3xMIQmwN/y1JdVInwk=; b=ssj4ZV1gFNhIukJCVkj0jja4A+EyQBCPfuy4Q95/fGF6GTk0aKyu1jb2+a0NL1T/h0nAhF BqZ3K2qMSrQ8FPWTIxveevqSrckGYN7zLibgYm69gOyLgi+/1SWTi+tqzT84ENYKNQQnwq L4nuBiQtCfk5FYjY6FwUPgA/VhsJwIQ= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5136D1370C; Tue, 13 Feb 2024 08:06:34 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 4NjOEAojy2WYQwAAD6G6ig (envelope-from ); Tue, 13 Feb 2024 08:06:34 +0000 Date: Tue, 13 Feb 2024 09:06:29 +0100 From: Michal Hocko To: Narcis Garcia Cc: linux-mm@kvack.org, Johannes Weiner , Roman Gushchin Subject: Re: swapaccount= commandline option Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspam-User: X-Stat-Signature: 89x1byhhfhnmzc3ro78868ugr7i1u38k X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: A615580013 X-HE-Tag: 1707811598-755023 X-HE-Meta: U2FsdGVkX19j/tOhKBFU36PTu3+DAKNMd36Fa+C6kNxozDTisyHuw8pLcDVLbxCk2XshavQZTga94YMOEep+DRLshbZIi4Zow5n534JD5GYUaNVSt0r/3a4iNzfIsj1lIvw308X8qY37E/qGIiHg/NAhfFv2X7xrPh7VYr8es6lJ1DfOSefw3SQHyAg4ApPpq9hhrZYHdr71DT59TjHwyeRYpvmOZ3yBzWRRiqEQIHmLWetTXJEomIGr8Eq2lM/GKKT+DJLPWYRsy0mlHIyxWJ1L1mnoi0HgHlb1vGY0XB/PKT/jkSs3jXPbBhZZh49aU1DyNgUSx8hR4rje8oK2GHEE20pXW4WcBTBrefhtMVdl5KUUQxa0GMPsUJa6nBe+vMkZyNNF0U/PJtdyZWs4IURyNXjfDyQAijS/nZpqi8yPPJ9Wrqv9tiKYQFlogwiaHWMhpRBDc5VfAfMX2PlMUp9Ymsd2QTGjCYg7HAEddclAwIKdkrUjuot/gmSfFb3JMSkvXgSbLE5Rc01aTo6tOIfs54XXZOC1+z9SJoVsK7EE+vX+ekmLE0aLcv+u/Tt+EmYK/X5fh9YJ9J5J18Zvx636AubpfsDJEIwIXx69he7JM+haDu79m7wAHpTk+whjNoqexBPauRFGjLIGIc5FN1hgJC5schdpyKeQp03w2i+BJSXb9nPFbhgyklSWVIohoP2tSj5X+2LEID+2zk2DqtDvxhTbDYwuU8NVx4Io2pv0PdQAomFdUfN26+/IGF20aQdqeFFYcDzk+9CotAEuMbDq9s7HKNF7eqziLcq50Htw7FGN6KXNcH3DWfi7yQ6i/Oe3fQAEcb2qpkBdts8WwS8f3c6VPAthGB9y7hyyAtoiN3kF7cFd6IGySvUqkbBB8WhejO8nu1HVM1WWJSmsytH7uDGCzVwj3qXi0vBZxL2i9K5Q1jhb3SDKgBFyObiEc4Xe5BAJ9IyqvgyGGa8 d+0uSmxs K2q4qQy0DXT1zBLK1F+M/5+c426n1Z+iooSd0TJ2P5747TIuYZMjZ8+r4c21CmVNhEeBEWBUNTIbir1fBIZ4L8fwPbAC2wuJBB2WVsbb+GkmfnuISvxMZvmLP0cZFQmNlHAiMbWjmI8BWLrKGqdhrG0zjcWeESuiYsf9yo+Scxr09eKzptuDiM9q5UPrp7rvOeuzQiYnGDdau+HvxiDwKwH90/DYncbZilRhH4clNLgpsRexMuis1ivkaGdXsqXsD60rVoJqa94TJpj3BTHXqbFertbLNWJT8kY3LnDaG726XTHZFcyKO4R9IPWhv87G8j/sRxmhZRolzXy6AVjUDS8mQSGWNG690TA20AC1On+n+2YzvZ2N1Q1t+ScN6med2+PhnDtRJtucvdmpo4IeYNI0GrJNc279tt65z 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: On Tue 13-02-24 08:01:37, Narcis Garcia wrote: > El 12/2/24 a les 23:37, Yosry Ahmed ha escrit: > > On Sun, Feb 11, 2024 at 1:33 AM Narcis Garcia wrote: > > > > > > Hello, > > > > > > I read this warning on Linux 6.1 boot: > > > The swapaccount= commandline option is deprecated. Please report your > > > usecase to linux-mm@kvack.org if you depend on this functionality. > > > > > > And I want to know if this impacts on LinuX Containers (LXC) swap > > > accounting. > > > > swapaccount= was deprecated in the sense that it is always on now > > (i.e. you cannot do swapaccount=0 anymore). I believe you are using > > swapaccount=1 and want to make sure that swap accounting will still > > work with v6.1, right? > > > > This is the second question we have had about this message [1]. I > > think we need to clarify the warning (and perhaps backport to stable > > kernels). > > > > [1]https://lore.kernel.org/linux-mm/2593755.Xrv9ptJ69j@sinistra.local/ > > > Thank you for answering this question, and sure this clarification is needed > both in documentation and warning message. > I've found deprecation message was commited on 26 Sep 2022. > From what Linux version release, this deprecation is included? > > I suggest this for setup_swap_account() code: > pr_warn_once("The swapaccount= commandline option is deprecated. " > "Swap accounting is always on. " > "Please report your usecase to linux-mm@kvack.org if you " > "depend on this functionality.\n"); Would it make more sense to warn only if somebody tries to disable the swap accounting? --- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index e4c8735e7c85..dec75eedf634 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -7936,7 +7936,10 @@ 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. " + bool res; + + if (kstrtobool(s, &res) || !res) + 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"); return 1; -- Michal Hocko SUSE Labs