Using mm.git or damon/next for DAMON patch baselines
SeongJae Park <[email protected]>
| Newsgroups | dev.linux.lists.sashiko |
|---|---|
| Message-ID | <[email protected]> |
Hello Sashiko team,
DAMON patches are usually based on a commit of damon/next [1] that based on
mm-new. So the baseline commit that added by git on the patch should be
available on damon/next. Or, mm-new should almost always the right choice for
the baseline.
But seems Sashiko is not aware of [2] that, and therefore sometimes fais
reviews at patch applying step. Could we make Sashiko to use mm trees or the
baseline commit on damon/next tree?
I was thinking changes like below might work, but I don't know how to
read/write/test Rust code... I also have no idea about how I can make Sashiko
to try finding the baseline commit from damon/next tree. So just asking here.
'''
diff --git a/src/baseline.rs b/src/baseline.rs
index 5eb3303..c3dc628 100644
--- a/src/baseline.rs
+++ b/src/baseline.rs
@@ -317,10 +317,12 @@ impl BaselineRegistry {
candidates.sort_by(|a, b| b.1.cmp(a.1).then_with(|| a.0.0.cmp(&b.0.0)));
// Check for Linux-MM special handling
- // If the top candidate is akpm/mm or linux-mm, OR the subsystem is MEMORY MANAGEMENT
+ // If the top candidate is akpm/mm or linux-mm or damon, OR the
+ // subsystem is MEMORY MANAGEMENT
let (top_url, _top_branch) = candidates[0].0;
let is_mm = top_url.contains("akpm/mm")
|| top_url.contains("linux-mm")
+ || top_url.contains("damon")
|| matched_subsystem_name
.as_deref()
.map(|s| s.eq_ignore_ascii_case("MEMORY MANAGEMENT"))
'''
[1] https://origin.kernel.org/doc/html/latest/mm/damon/maintainer-profile.html#scm-trees
[2] https://sashiko.dev/#/patchset/20260425203309.108879-1-sj%40kernel.org
Thanks,
SJ