From nobody Sat Sep 26 14:38:09 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 6A7B749B1E2; Mon, 31 Aug 2026 14:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788188253; cv=none; b=QJ25ZUUSJFpxAyuMxdRjBI783ovNzibhTcBzzDprbN++mlI6ezijGSbU8YKXoU90gGW4h1ExXHcwd7yBHIca+aJZIVwwvYyUwrUGMkpEo2heWMZWLPxipGzthrfmTJPU60waiBuyZ/hFaK6l52Q0CH3iINtycwEmTuam3cuootg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788188253; c=relaxed/simple; bh=U66EgBIXfzWZZtEx1tQdKrHAOcSaBAOVzOMEML/vW2Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uJprsxK8q6UcGBfHgAIEPF9ljdU6iY6z9EU49LRgRFC89vfFsfeyq18Texh4Rg9z9YLF1apeJ/+wvrmgMLTSlko+DiwrGrEIYruWmLbgAWGOCdylrIFzP9QAtV2aINaObJ3RF7dC1dRMl/uAG7Qu/7u6YDYcq386CT7xqv7z4fw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KxCSK/lI; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KxCSK/lI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 19FC41F00A3D; Mon, 31 Aug 2026 14:57:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788188252; bh=Z/q1Yeqt6RZSRYDCAAqabUKJ+epH72uUvgP43VjXaQA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=KxCSK/lI8mnji2zwaf/RVqvW+az04RzyWNdMfc3c+ybG4VfvWmsMx/AWEBnruTqlX 2gCeddu+zUitH+oCA8x+HaamRBjID4B13iry5qKRARgbwv97eM6fVxQDenNmLXqO7F 1XKpDbESRqGQX6T9L85R8Q8vu/G8X8leYnrIoqY7bEwTlrIT+ZU5+iHy0YOlTAhoQn Ih6ij8ycmERAJhn/eA/1G1FI/0O/Unes5koZsCepWYjJ+APQDSkECLaBrNcpPxv3vL hd3GasJn/yKKL4zkS48W8MGu0shMw0JhJYi9ZCGURAfymUsWrgrSlRFQXPvOLbJu1v MFZWVPcKfyA1A== From: SJ Park To: Andrew Morton Cc: SJ Park , damon@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Cheng-Han Wu Subject: [PATCH v2 1/2] mm/damon/core: remove unused damon_targets_empty() Date: Mon, 31 Aug 2026 07:57:21 -0700 Message-ID: <20260831145724.82387-2-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260831145724.82387-1-sj@kernel.org> References: <20260831145724.82387-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" damon_targets_empty() has had no in-tree users since commit 5ec4333b1967 ("mm/damon: remove DAMON debugfs interface") removed its last caller. Remove the unused declaration and definition. Signed-off-by: Cheng-Han Wu Reviewed-by: SJ Park Signed-off-by: SJ Park --- include/linux/damon.h | 1 - mm/damon/core.c | 5 ----- 2 files changed, 6 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 310509455db13..9835b864a8db9 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -1056,7 +1056,6 @@ int damos_commit_quota_goals(struct damos_quota *dst,= struct damos_quota *src); =20 struct damon_target *damon_new_target(void); void damon_add_target(struct damon_ctx *ctx, struct damon_target *t); -bool damon_targets_empty(struct damon_ctx *ctx); int damon_set_target_pid(struct damon_target *t, int pid); void damon_free_target(struct damon_target *t); void damon_destroy_target(struct damon_target *t, struct damon_ctx *ctx); diff --git a/mm/damon/core.c b/mm/damon/core.c index 3fa1b096c8330..043eb38de5fd3 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -798,11 +798,6 @@ void damon_add_target(struct damon_ctx *ctx, struct da= mon_target *t) list_add_tail(&t->list, &ctx->adaptive_targets); } =20 -bool damon_targets_empty(struct damon_ctx *ctx) -{ - return list_empty(&ctx->adaptive_targets); -} - /* * Assign the struct pid of the given pid number to the given target. */ --=20 2.47.3 From nobody Sat Sep 26 14:38:09 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 B6B5D49C4BA; Mon, 31 Aug 2026 14:57:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788188253; cv=none; b=YVSNkccGBZWMcZQHbTY/1Soq/l5ybZp9drMCglxJJmsq3MNKFVmBk0zjeIHuSu2ooDZwchMep7sO2D7puRjxc6B1f9HdZHor6nO0Xy5OZkE52RTBsTMrZeKkLXXG4uwJWYuQ3GuVCz22ixG2QRGVLkPdpvLEHQcbtKs94L80zpk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788188253; c=relaxed/simple; bh=UE0RnzVn480eoP0WC9sVQd7CJ7fMw/fMqjNlKhE30co=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jd1SAPPBzTZ20wHv7hbpFo/UKH9qyYtqpOF4zGn1mrfhXf1VMxeNrFJPVcazNY3UXmfXrg5SyGjCfBm5DczBiHcBoJAVTKoxOfB3aNbl65+mbxv5H+FNa/xka4EBqyfnkbRgyo2cVgi1G3MguEGwHy8OLOC6kurkDXVAwDGlNMk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N+zCiSEG; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N+zCiSEG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FEC91F00A3E; Mon, 31 Aug 2026 14:57:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1788188252; bh=m77KSml7J9PVuWvfDXU+9FGVhk1wJqugBBvBHQZQDmo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=N+zCiSEGrK3Nhq36uxKo0p9P/kcOA4cpEbSw5T1KZg+DAK8nJN/eTFcWbFp0r5vvs 2P/YVxF3C7gxWGtQLNfoDgeZ6uK2Whscwipd1W8j/ie71rBLoY7vpdjl9ANKFYBbPw oTNNIOkfqYWe1l1auFjEgXoKhNfBWdaoqSQJtVQOJnrvXFTPXw4ZqpPQQ+kLHIFC4d 2R3RBZHF1ZtLQdsiZfibRVSCGTi+WjRfuN+gUOJUx+pcM0yiSxVzuoXvIjva+B0H0o P7GFCV33v1VXSE9jCh3GmunH/A18fTlnnUIupp2+JUN8SbsWuxLWb7X8TbZo7wiQ5e gfqrnnq930bpQ== From: SJ Park To: Andrew Morton Cc: Cheng-Han Wu , SJ Park , damon@lists.linux.dev, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v2 2/2] mm/damon/core: remove unused damon_nr_running_ctxs() Date: Mon, 31 Aug 2026 07:57:22 -0700 Message-ID: <20260831145724.82387-3-sj@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260831145724.82387-1-sj@kernel.org> References: <20260831145724.82387-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" From: Cheng-Han Wu damon_nr_running_ctxs() has had no in-tree users since commit 5ec4333b1967 ("mm/damon: remove DAMON debugfs interface") removed all of its callers. Remove the unused declaration and definition. Signed-off-by: Cheng-Han Wu Reviewed-by: SJ Park Signed-off-by: SJ Park --- include/linux/damon.h | 1 - mm/damon/core.c | 14 -------------- 2 files changed, 15 deletions(-) diff --git a/include/linux/damon.h b/include/linux/damon.h index 9835b864a8db9..6842a336291e8 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -1067,7 +1067,6 @@ int damon_set_attrs(struct damon_ctx *ctx, struct dam= on_attrs *attrs); void damon_set_schemes(struct damon_ctx *ctx, struct damos **schemes, ssize_t nr_schemes); int damon_commit_ctx(struct damon_ctx *old_ctx, struct damon_ctx *new_ctx); -int damon_nr_running_ctxs(void); bool damon_is_registered_ops(enum damon_ops_id id); int damon_register_ops(struct damon_operations *ops); int damon_select_ops(struct damon_ctx *ctx, enum damon_ops_id id); diff --git a/mm/damon/core.c b/mm/damon/core.c index 043eb38de5fd3..53c3f97e3f126 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -1866,20 +1866,6 @@ int damon_commit_ctx(struct damon_ctx *dst, struct d= amon_ctx *src) return err; } =20 -/** - * damon_nr_running_ctxs() - Return number of currently running contexts. - */ -int damon_nr_running_ctxs(void) -{ - int nr_ctxs; - - mutex_lock(&damon_lock); - nr_ctxs =3D nr_running_ctxs; - mutex_unlock(&damon_lock); - - return nr_ctxs; -} - /* Returns the size upper limit for each monitoring region */ static unsigned long damon_region_sz_limit(struct damon_ctx *ctx) { --=20 2.47.3