linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: <gutierrez.asier@huawei-partners.com>
To: <gutierrez.asier@huawei-partners.com>, <artem.kuzin@huawei.com>,
	<stepanov.anatoly@huawei.com>, <wangkefeng.wang@huawei.com>,
	<yanquanmin1@huawei.com>, <zuoze1@huawei.com>,
	<damon@lists.linux.dev>, <sj@kernel.org>,
	<akpm@linux-foundation.org>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Subject: [RFC PATCH v2 2/4] mm/damon: Support for synchrounous huge pages collapse
Date: Tue, 10 Mar 2026 16:24:18 +0000	[thread overview]
Message-ID: <20260310162420.4180562-3-gutierrez.asier@huawei-partners.com> (raw)
In-Reply-To: <20260310162420.4180562-1-gutierrez.asier@huawei-partners.com>

From: Asier Gutierrez <gutierrez.asier@huawei-partners.com>

Signed-off-by: Asier Gutierrez <gutierrez.asier@huawei-partners.com>
Co-developed-by: Anatoly Stepanov <stepanov.anatoly@huawei.com>
---
 include/linux/damon.h | 1 +
 mm/damon/vaddr.c      | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/include/linux/damon.h b/include/linux/damon.h
index a4fea23da857..a9cf17b9e8fa 100644
--- a/include/linux/damon.h
+++ b/include/linux/damon.h
@@ -142,6 +142,7 @@ enum damos_action {
 	DAMOS_LRU_DEPRIO,
 	DAMOS_MIGRATE_HOT,
 	DAMOS_MIGRATE_COLD,
+	DAMOS_COLLAPSE,
 	DAMOS_STAT,		/* Do nothing but only record the stat */
 	NR_DAMOS_ACTIONS,
 };
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index 729b7ffd3565..36791a9a1094 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -969,6 +969,9 @@ static unsigned long damon_va_apply_scheme(struct damon_ctx *ctx,
 	case DAMOS_NOHUGEPAGE:
 		madv_action = MADV_NOHUGEPAGE;
 		break;
+	case DAMOS_COLLAPSE:
+		madv_action = MADV_COLLAPSE;
+		break;
 	case DAMOS_MIGRATE_HOT:
 	case DAMOS_MIGRATE_COLD:
 		return damos_va_migrate(t, r, scheme, sz_filter_passed);
-- 
2.43.0



  parent reply	other threads:[~2026-03-10 16:25 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 16:24 [RFC PATCH v2 0/4] mm/damon: Support hot application detections gutierrez.asier
2026-03-10 16:24 ` [RFC PATCH v2 1/4] mm/damon: Generic context creation for modules gutierrez.asier
2026-03-11  0:57   ` SeongJae Park
2026-03-11 13:10     ` Gutierrez Asier
2026-03-11 14:15       ` SeongJae Park
2026-03-10 16:24 ` gutierrez.asier [this message]
2026-03-11  1:02   ` [RFC PATCH v2 2/4] mm/damon: Support for synchrounous huge pages collapse SeongJae Park
2026-03-11 13:11     ` Gutierrez Asier
2026-03-11 14:17       ` SeongJae Park
2026-03-10 16:24 ` [RFC PATCH v2 3/4] mm/damon: New module with hot application detection gutierrez.asier
2026-03-11  4:11   ` SeongJae Park
2026-03-11 13:45     ` Gutierrez Asier
2026-03-11 14:32       ` SeongJae Park
2026-03-10 16:24 ` [RFC PATCH v2 4/4] DAMON_HOT_HUGEPAGE documentation gutierrez.asier
2026-03-11  5:07 ` [RFC PATCH v2 0/4] mm/damon: Support hot application detections SeongJae Park
2026-03-11 13:08   ` Gutierrez Asier
2026-03-11 14:39     ` SeongJae Park
2026-03-11 23:55       ` SeongJae Park
2026-03-12 14:42       ` Gutierrez Asier
2026-03-13  0:08         ` SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260310162420.4180562-3-gutierrez.asier@huawei-partners.com \
    --to=gutierrez.asier@huawei-partners.com \
    --cc=akpm@linux-foundation.org \
    --cc=artem.kuzin@huawei.com \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sj@kernel.org \
    --cc=stepanov.anatoly@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yanquanmin1@huawei.com \
    --cc=zuoze1@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox