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 EB133C636CD for ; Fri, 10 Feb 2023 04:35:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4E32A6B00E8; Thu, 9 Feb 2023 23:35:07 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 493966B00E9; Thu, 9 Feb 2023 23:35:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 35C036B00EA; Thu, 9 Feb 2023 23:35:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 24EE76B00E8 for ; Thu, 9 Feb 2023 23:35:07 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id DA77A1612DE for ; Fri, 10 Feb 2023 04:35:06 +0000 (UTC) X-FDA: 80450117412.09.A2440E0 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf24.hostedemail.com (Postfix) with ESMTP id 24AA4180002 for ; Fri, 10 Feb 2023 04:35:04 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=sQtnlnBi; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1676003705; 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=pR4aGR/Uiim/4mqio9AixYJWWgVTmYAj2gayZftDYbI=; b=ovyS1fgfRS6OwDBLQYZYOLl9Qgi+X3VCRCMRRLSyQVo/egVDSQCvCcixDK3pB1sj5YaqQl HDeAJRkMSrprbWrR+CMaNzoA9VqtXvS+6Gp1ZLPOpDA6X3yfwhUDYG6VuuReqE3HA9O2by 4YT0nFLwEcubowYgc+2HGVf3DE2SD/s= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=sQtnlnBi; spf=pass (imf24.hostedemail.com: domain of sj@kernel.org designates 139.178.84.217 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=1676003705; a=rsa-sha256; cv=none; b=BuvvgLKA+QEhq+R4ueuKENIRMmhP+Y6o5ZN3iRm8zu/XhTU1WzjkYv1XsYpn1+/oxHEfO4 M6Ev3qgOIeviTaZ3zMS6ETBTPEgSB4HTNmLzpA7V28r6BS9UgwRmMyZ4phSDucfQnm9j4e cLeltz2xw3KRQfeQpYUuXNjNaUaoN+A= 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 dfw.source.kernel.org (Postfix) with ESMTPS id 0EA8261C9C; Fri, 10 Feb 2023 04:35:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E576CC433D2; Fri, 10 Feb 2023 04:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676003703; bh=oPZw6TRpEq4CV83ACbyCdBbv0Mstfa8pKo4weHQkuwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sQtnlnBiwCE+2/SjvWUOft/HTPpEwtfRAW4YnjFW8M18xzWMHXlgEJbS+jkusr8Yb hI2euD76zWGn8UOQcv8WaQZySBRmb/k1SDEyK8Md3JxOfaiQG4xB+cVAgbutAi9Iup CfDAHYCxGtbvV19X0bi6Q7tFWkL21fZubJ4LFCamOel6E0tfA4OvfNtB7rjKYi2UvH gXtkaoh19z3iESNXax7FkZB9uf1tqpAxS+S0liIn17niEs24jn8wDo3RJXd9sAJiYH briFrDFLyWL4fVW9YHWtYHRckclfjw+RufblSXwdYdq7pUeDxZorT+rirW/xMtlBSV FgquIeMXrM8ig== 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:35:01 +0000 Message-Id: <20230210043501.56015-1-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <655f44cf-1d39-c2c1-1a93-d8eec39064b4@infradead.org> References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 24AA4180002 X-Stat-Signature: 74ircum43d1gxkq61fa4q64zychgkezt X-HE-Tag: 1676003704-340566 X-HE-Meta: U2FsdGVkX1/af2yOjkQ64Ht64EmSHPiNzzH3juBBUeLDjxOE6fJ71AhkJ4pXZHKw594z9hEy+dQOMTm0jPzzGKOEbpDxCyke2DBDsVySfM2FRGk18zFnPrVjYHxP8A0Wnh4to5TYNigORZVv8/NKQOa85TCXlVk3K+Ob83uZibTDYCiNo7N+vaCnQMFSjLF4xYzqLB9KBqHdOvGlwLBfQJlyVUtvKlhtFr2tuGLMsgRx4w85xI1eCdn3PkSERZAcVewTh6DJbpfTesqQTkV9FnxVWD4O5qMYiDVaXcXO4Cl7/Yv45faW3WkaJO/E4vrMOnUjnx1Rf4woF7I0VC/2Nqe5QDyx+sOPn/QAhYReZb++r7n92u8HZGIJS/eH0c5sXH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4N1JdfRfil38keSDGbpcstSQDTSqV5Y5SJCBmR1HtASc5xyzTvxOzF1n7B9dVwB4eM= 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: On Thu, 9 Feb 2023 20:32:21 -0800 Randy Dunlap wrote: > Hi, > > On 2/9/23 20:24, SeongJae Park wrote: > > 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. > > I see. > > > > > 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. > > It's OK to ignore checkpatch sometimes. :) > > > > > 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? > > I'm OK with either one of these, but I prefer your first example over the second one. Thank you for quick reply. I will send v2 with the first one. Thanks, SJ > > > [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. > -- > ~Randy >