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 017A3C05027 for ; Fri, 10 Feb 2023 04:24:36 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 957946B00DF; Thu, 9 Feb 2023 23:24:36 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 907F96B00E0; Thu, 9 Feb 2023 23:24:36 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7D02C6B00E1; Thu, 9 Feb 2023 23:24:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6FEB56B00DF for ; Thu, 9 Feb 2023 23:24:36 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 2B0DB1612CF for ; Fri, 10 Feb 2023 04:24:36 +0000 (UTC) X-FDA: 80450090952.16.C20DC44 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf04.hostedemail.com (Postfix) with ESMTP id 4F8CA40010 for ; Fri, 10 Feb 2023 04:24:33 +0000 (UTC) Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=trmk8kLh; spf=pass (imf04.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676003073; 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=sppGi4y4N6VLvaIWWZoACu4l3r0GQS/p1wkGWGZmRe8=; b=f5znp3RhMP10jYsPCdYx81EOg153z7pHkZCwf1LDhc2RR5lYGJNA6gLan6NfpJ3UPmV8L6 9a04porvwep5NOigkGNAhFeWGnJMVKoAc4q2v1iOBiWmMW91v5jjz8QPKfpsChXpmbPKXr BCkGLkG8ipBJeNRRRLaRAAHCfwlCHO0= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=trmk8kLh; spf=pass (imf04.hostedemail.com: domain of sj@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=sj@kernel.org; dmarc=pass (policy=none) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676003073; a=rsa-sha256; cv=none; b=JI95Z3lhoyWDDMb/Sy6kCx0CDoj7aLJT88CTR/VVdUGgIsY2KYDMFWTiwfS09lEzcXKdun 9iPeG5wB/orWN8mCoF5AhiCwpmCbVBIgU5HhyNqCGEjjyg2aXrUu8q8xLWwmg17VMtrKC6 L7bEJYVe6S65NWWhb4iaXM+e1eourRk= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D126AB819FF; Fri, 10 Feb 2023 04:24:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D543C433D2; Fri, 10 Feb 2023 04:24:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676003070; bh=Q5Xp2O+5KYdWZ+voh/i9lBg3FJpd9FO9qvnfklGAX88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=trmk8kLhEhUXQaQJXTL8scTpoBaC4E65qqOaiVT7Oh96Ecgs4hDO+KDGboNRIpbeG e4IE+Ju/2kmhEAUy5nhFXp19hrRLjap73WBXCmG03itDOnUM4nj6jBukAH3C0IBPZW WphWtnopyfqEQKCMGLOWneKZH4PSZFGgwAYJtNrZO6kfPisKAyun2MPexJXdr6Mg/e ptVncQjM34byojaOZgqUGIawktuikHLhHrfAYl7P7sAvCfMaYR9l4VJ2FNgO/eC5VP fYs/Pg4LQLb/nZPslkSonJ95eOkgCUEITAYtJ7U1k1jYDctSHN4nxlz+UPZyuH6Jev TefpMnU4VTH9g== From: SeongJae Park To: Randy Dunlap Cc: SeongJae Park , Andrew Morton , damon@lists.linux.dev, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] mm/damon/dbgfs: print DAMON debugfs interface deprecation message Date: Fri, 10 Feb 2023 04:24:28 +0000 Message-Id: <20230210042428.55864-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4F8CA40010 X-Stat-Signature: ayw5uxpatwjoms4gpw8hnr55wz46zf7k X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1676003073-516978 X-HE-Meta: U2FsdGVkX19Yu1pZxTct8rK9ua1E9XBCQFNK9K+Kllw5fgEdifR0ggx+/K4aUBSbu51Z/XjeEUaFnjxcUCLIlMQJhPGoTK+zPyU1d+GRI/ciqNwdI1kUH1yRWUgsKs4AraOeE7vgz4SBzIQwfRkCMRshw5JBKJaw9d30bfEt9PuZuSkTHh6srQq39C0D8mpil4RRd+F7NjcM0q6tBG1LdV8OM5sWw0cIyUK3mgTtYs4qWFJlZvjOKxV6DOssbbg3+K4gtiXCM/Ok2mMv+E0VtZ3cR+UzydatV80zHKGG8vqAK5GLUArR+Gyr5VJwS3XthSbUmMmbkBbBtGIcBPXK7EPcfNoKDcmGA1g7MhdllQeJOEc/5yTLEtdRyahHjmauMzScSah/LDjlJQoUlolXN5b/YllRwGc8oohNR9Y0Y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QMUTLpPzXE6fkatKuQ= 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: Hi Randy, On Thu, 9 Feb 2023 19:26:43 -0800 Randy Dunlap wrote: > Hi, > > On 2/9/23 11:20, SeongJae Park wrote: > > DAMON debugfs interface has announced to be deprecated after >v5.15 LTS > > kernel is released. And, v6.1.y has announced to be an LTS[1]. > > > > Though the announcement was there for a while, some people might not > > noticed that so far. Also, some users could depend on it and have > > problems at movng to the alternative (DAMON sysfs interface). > > > > For such cases, warn DAMON debugfs interface deprecation with contacts > > to ask helps when any DAMON debugfs interface file is opened. > > > > [1] https://git.kernel.org/pub/scm/docs/kernel/website.git/commit/?id=332e9121320bc7461b2d3a79665caf153e51732c > > > > Signed-off-by: SeongJae Park > > --- > > mm/damon/dbgfs.c | 16 ++++++++++++++++ > > 1 file changed, 16 insertions(+) > > > > diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c > > index b3f454a5c682..e551a20b35e3 100644 > > --- a/mm/damon/dbgfs.c > > +++ b/mm/damon/dbgfs.c > > @@ -20,6 +20,11 @@ static int dbgfs_nr_ctxs; > > static struct dentry **dbgfs_dirs; > > static DEFINE_MUTEX(damon_dbgfs_lock); > > > > +static void damon_dbgfs_warn_deprecation(void) > > +{ > > + pr_warn_once("DAMON debugfs interface is deprecated, so users should move to the sysfs interface (DAMON_SYSFS). If you depend on this and cannot move, please report your usecase to damon@lists.linux.dev and linux-mm@kvack.org.\n"); > > +} > > Line length of 234 is a bit over the limit. > I think it would be OK to split it at the end of the first sentence, like: > > pr_warn_once("DAMON debugfs interface is deprecated, so users should move to the sysfs interface (DAMON_SYSFS).\n"); > pr_warn_once("If you depend on this and cannot move, please report your usecase to damon@lists.linux.dev and linux-mm@kvack.org.\n"); > > or would that [2 pr_warn_once() calls] not work for some reason? > > Or even: > > pr_warn_once( > "DAMON debugfs interface is deprecated, so users should move to the sysfs interface (DAMON_SYSFS).\n"); > pr_warn_once( > "If you depend on this and cannot move, please report your usecase to damon@lists.linux.dev and linux-mm@kvack.org.\n"); > > although some people might gag at that one. Thank you for your opinion. I considered that, but I was worrying if some other messages come between those two separated messages. What do you think about breaking the string like below? I first tried to do so like memcg hierarchy[1], but ended up to this version because of checkpatch.pl outputs[2]. However, if others doesn't care, I think this is ok. pr_warn_once("DAMON debugfs interface is deprecated, " "so users should move DAMON_SYSFS. If you depend on this " "and cannot move, please report your usecase to " "damon@lists.linux.dev and linux-mm@kvack.org.\n"); If breaking user-visible string is not ok, maybe we could make it as short as your above example. pr_warn_once("DAMON_DBGFS is deprecated; please contact to damon@lists.linux.dev and linux-mm@kvack.org if you depend on it.\n"); May I ask your opinion? [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/memcontrol.c?h=v6.1#n3643 [2] https://docs.kernel.org/process/coding-style.html#breaking-long-lines-and-strings Thanks, SJ > > > -- > ~Randy