From nobody Fri Oct 3 00:51:27 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8487424DCE9; Tue, 9 Sep 2025 02:22:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757384563; cv=none; b=cnPIyCBq08QvD1d1j9JNl9+Wn3x8t4XEN6hgyAFqR9oC65UPf2rRMQByqlbH9gZ5PDn1XoUAbfNuS/LfD764ub74zzIAYuTP2caondeO5oSuqvHz7+Rr3YJmRcDrvCMompuxy+VadN3YpU9HZjACXON2j6yzJ5rw5BDYvCI7jvg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757384563; c=relaxed/simple; bh=DHqTS3AzUjYGHdLzhzK2+dBwRPHotpFoyVLaW4sFFjU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pLDJtzGwnJfSA6QwfVg6ySNoSQ8CsL1spnwBp94yr6giXJqdsiZsKmXe9iNrjZPGgjUMlh2P8IvNRQ23ZOicrsTwwKyYin0POMZhmxEnoWKTYLoVKSmAu1+hMrE1zAeao3PwjoNzbLOt6D+AWG0a/1QNBiScU6Bu75Oq8ol5IIc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=mPzDToC6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="mPzDToC6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB854C4CEF1; Tue, 9 Sep 2025 02:22:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757384563; bh=DHqTS3AzUjYGHdLzhzK2+dBwRPHotpFoyVLaW4sFFjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mPzDToC691DQi0WMja/yox6GhsLGehAPJrLbU4aKav/K0JwbbVH+XmLecKYHmwJ9y ZDyHA//PDOfabF57QyqJQfms2JF7VrNzoyw1Nd2ohejk1fHE0ixbGm9APgWU1nJhnP aYp9nnDwa4yl15YxOJcdsGCXffR3ZJq7Byj/BvNMTXX8FkPF2GClY6UQaqomc+aR3H sr18Eb26hBMxjlml6lfk8jjHHfFK8L+S7yT7n98qnN93dBKVgZ3gnDO8OEA1Gw2t6+ jKI53vL7ntWYlxipnauHTDBULve+sjnmbtr2kyUfkqwvj0Enjm2FXZ6Ce6Jy9rwEUG 28rHW4+F5VQBQ== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , "# 6 . 17-rc1" , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 1/3] samples/damon/wsse: avoid starting DAMON before initialization Date: Mon, 8 Sep 2025 19:22:36 -0700 Message-Id: <20250909022238.2989-2-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250909022238.2989-1-sj@kernel.org> References: <20250909022238.2989-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Commit 0ed1165c3727 ("samples/damon/wsse: fix boot time enable handling") is somehow incompletely applying the origin patch [1]. It is missing the part that avoids starting DAMON before module initialization. Probably a mistake during a merge has happened. Fix it by applying the missed part again. [1] https://lore.kernel.org/20250706193207.39810-2-sj@kernel.org Fixes: 0ed1165c3727 ("samples/damon/wsse: fix boot time enable handling") Cc: # 6.17-rc1 Signed-off-by: SeongJae Park --- samples/damon/wsse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/damon/wsse.c b/samples/damon/wsse.c index da052023b099..21eaf15f987d 100644 --- a/samples/damon/wsse.c +++ b/samples/damon/wsse.c @@ -118,6 +118,9 @@ static int damon_sample_wsse_enable_store( return 0; =20 if (enabled) { + if (!init_called) + return 0; + err =3D damon_sample_wsse_start(); if (err) enabled =3D false; --=20 2.39.5 From nobody Fri Oct 3 00:51:27 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 842E0253B59; Tue, 9 Sep 2025 02:22:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757384564; cv=none; b=srhOXoGFskkaDxnPJ/ShCNCk64aHLkMycf/ExWLx6Gfx3HEGSw3pJOVkmvpDlalXX6J1JMFmBntV5Mg/61bjUdR1R1kNRbrc9WZTlDXmcf3dqJ3F79vt5gUF+PCbsOmbq9q7eaOec9b5bXalptJ6QiGeL/zYt8O27Eq5AZFFWDQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757384564; c=relaxed/simple; bh=aE3MoR2tQr9P83NDIFS+on/nd9/NuFxzaUakeTNxCms=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Wjov2NXieTUWijqkYlQIN3C6CFP3o9L4Dp1qvCa77B/kKFYk4tKc2EEeI42bdNIL29nBdJG843jfif9JwHDVtpUlcBFJiMFT4t0AwNAoeEYM7WSP6EJlSXSFG/SeBfVzF36NTUAFVuEJR+RC8ogCbl1MoOlqRO04KlzW6ZWYgiw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oTp3KKAa; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oTp3KKAa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9519C4CEF1; Tue, 9 Sep 2025 02:22:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757384564; bh=aE3MoR2tQr9P83NDIFS+on/nd9/NuFxzaUakeTNxCms=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oTp3KKAa1bHkGzU+GjVolsTd6qVyUDIDYpgAmm9g0iKVAi7FC5+vMLcxjCivtCkaJ 9JfOBCyKVqFvKa5rdFWxeJGhvb3LYkE2spsimlwJFt/QUzhx7a1hcKMOVzn/9hnkzx IKIbT/Saf2AN6UmhD9hLfgbUp1qxcmsLw1nlIWvtqpy27HzZBtPwGpvEseJWv6HRi/ adjJLYJq5JLCdfeaOa5FEDTp3+eEz8Rs0kZKNf+pHuc0SfHaPBv2hEqOfr+ZSxrHWF s78MP+bVJlUUzqq9fOs8hyB3By5oE6nTDsBLTmo6PQRufcYu7D9XQCK48bS/M3JanY oHuuzqJfqubxA== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , "# 6 . 17-rc1" , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 2/3] samples/damon/prcl: avoid starting DAMON before initialization Date: Mon, 8 Sep 2025 19:22:37 -0700 Message-Id: <20250909022238.2989-3-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250909022238.2989-1-sj@kernel.org> References: <20250909022238.2989-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Commit 2780505ec2b4 ("samples/damon/prcl: fix boot time enable crash") is somehow incompletely applying the origin patch [1]. It is missing the part that avoids starting DAMON before module initialization. Probably a mistake during a merge has happened. Fix it by applying the missed part again. [1] https://lore.kernel.org/20250706193207.39810-3-sj@kernel.org Fixes: 2780505ec2b4 ("samples/damon/prcl: fix boot time enable crash") Cc: # 6.17-rc1 Signed-off-by: SeongJae Park --- samples/damon/prcl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/damon/prcl.c b/samples/damon/prcl.c index 1b839c06a612..0226652f94d5 100644 --- a/samples/damon/prcl.c +++ b/samples/damon/prcl.c @@ -137,6 +137,9 @@ static int damon_sample_prcl_enable_store( if (enabled =3D=3D is_enabled) return 0; =20 + if (!init_called) + return 0; + if (enabled) { err =3D damon_sample_prcl_start(); if (err) --=20 2.39.5 From nobody Fri Oct 3 00:51:27 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A797256C84; Tue, 9 Sep 2025 02:22:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757384565; cv=none; b=ib3hw/rbf8e7Hcw/XCvq9vDjbMy28odc2OgezJpHj17v+qiWxlC5s5/DNnw2UuIjhncJkXhxw22+7ZVsjLMLCE5KjuNyg4ZlTX6vZautlsYnutibna3szqdlHqqc9VeWxexghn2P/892UcbcXZPzwHAPyD3EKN1R0p+mHlOiM9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757384565; c=relaxed/simple; bh=CB5KTCrWLMEdIF9ZzZSCMis1Zik0Tvcul4qLyUj2Xrw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iDMnZiWQi/iRHcpTdGsBVVKxkwlOJHCgX2r0hg+y6/lkBLWLMrent4pFbU6HkSYhg21Zbs5Xz0+P4ygDL7gFzVZAgw5R7kweg8bk6Nqfe2exM3cI56BSoIWuMPftWD4KCQjcILznOvCaKKQyFhAhfo5GHZtxcLmDM9atK9DdLTU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=tGDFUtKy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="tGDFUtKy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01951C4CEF8; Tue, 9 Sep 2025 02:22:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1757384565; bh=CB5KTCrWLMEdIF9ZzZSCMis1Zik0Tvcul4qLyUj2Xrw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tGDFUtKyB2aBLklonbKqRX1K/OAwoFApnAAISTqDhc3Z65P5N01TsAk+x46RRDyER SjzbfPnU3GKG/8DK9KPAeuhuV+j/XMIEkoX/Eqd+KdhETEkjrDTWpCKSXQ7Kp+q6DM iWx3/E8YYW57igz2Rew49DmXqvQyH+SuJf0uqBLXP+41qQJFy0GkF+nvwcdNha86wu ewGzVsz4Rmf8PlY55nv79k4NwScDJdlzghmCojMoz+3Dp528wuX3W0kn0Lu3QYqKKt NyFbKoSuZANRagwvcx12ZXolv4MHUPCCaKTT0NxhHS4SQsEG9IlRjPjpdguqOMqyZE i4w+y9XloLzJg== From: SeongJae Park To: Andrew Morton Cc: SeongJae Park , "# 6 . 17-rc1" , damon@lists.linux.dev, kernel-team@meta.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 3/3] samples/damon/mtier: avoid starting DAMON before initialization Date: Mon, 8 Sep 2025 19:22:38 -0700 Message-Id: <20250909022238.2989-4-sj@kernel.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250909022238.2989-1-sj@kernel.org> References: <20250909022238.2989-1-sj@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Commit 964314344eab ("samples/damon/mtier: support boot time enable setup") is somehow incompletely applying the origin patch [1]. It is missing the part that avoids starting DAMON before module initialization. Probably a mistake during a merge has happened. Fix it by applying the missed part again. [1] https://lore.kernel.org/20250706193207.39810-4-sj@kernel.org Fixes: 964314344eab ("samples/damon/mtier: support boot time enable setup") Cc: # 6.17-rc1 Signed-off-by: SeongJae Park --- samples/damon/mtier.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/samples/damon/mtier.c b/samples/damon/mtier.c index 7ebd352138e4..beaf36657dea 100644 --- a/samples/damon/mtier.c +++ b/samples/damon/mtier.c @@ -208,6 +208,9 @@ static int damon_sample_mtier_enable_store( if (enabled =3D=3D is_enabled) return 0; =20 + if (!init_called) + return 0; + if (enabled) { err =3D damon_sample_mtier_start(); if (err) --=20 2.39.5