Re: (sashiko review) [RFC PATCH v2 1/1] mm/damon: support MADV_COLLAPSE via DAMOS_COLLAPSE scheme action

From: Gutierrez Asier

Date: Tue Mar 24 2026 - 09:54:29 EST


Hi SJ,

On 3/24/2026 3:41 AM, SeongJae Park wrote:
> On Mon, 23 Mar 2026 17:29:36 -0700 SeongJae Park <sj@xxxxxxxxxx> wrote:
>
>> Forwarding Sashiko review for doing discussions via mails.
>>
>> # review url: https://sashiko.dev/#/patchset/20260323145646.4165053-2-gutierrez.asier@xxxxxxxxxxxxxxxxxxx
>> # start of sashiko.dev inline review
>> commit eaed291e6fae91842b1836c68bab867d53525db5
>> Author: Asier Gutierrez <gutierrez.asier@xxxxxxxxxxxxxxxxxxx>
>>
>> mm/damon: support MADV_COLLAPSE via DAMOS_COLLAPSE scheme action
>>
>> This commit introduces a new DAMON action, DAMOS_COLLAPSE. It allows
>> DAMON to synchronously collapse an address range by calling madvise
>> with MADV_COLLAPSE.
>>
>> Link: https://lore.kernel.org/damon/20260313000816.79933-1-sj@xxxxxxxxxx/
>>
>> [ ... ]
>>> diff --git a/tools/testing/selftests/damon/sysfs.py b/tools/testing/selftests/damon/sysfs.py
>>> index 3aa5c91548a5..c6476e63f4fb 100755
>>> --- a/tools/testing/selftests/damon/sysfs.py
>>> +++ b/tools/testing/selftests/damon/sysfs.py
>>> @@ -123,11 +123,12 @@ def assert_scheme_committed(scheme, dump):
>>> 'pageout': 2,
>>> 'hugepage': 3,
>>> 'nohugeapge': 4,
>>> - 'lru_prio': 5,
>>> - 'lru_deprio': 6,
>>> - 'migrate_hot': 7,
>>> - 'migrate_cold': 8,
>>> - 'stat': 9,
>>> + 'collapse': 5
>>> + 'lru_prio': 6,
>>
>> Will this cause a Python syntax error when executing the selftest? It looks
>> like there is a missing comma after 'collapse': 5, which might break the
>> execution of the DAMON sysfs test suite.
>
> I think sashiko is correct. We need to add a comma.
I will fix it. Missed it, my bad
>
>
> Thanks,
> SJ
>
> [...]
>

--
Asier Gutierrez
Huawei