Re: [PATCH v2] mm/damon/vaddr: remove redundant RCU lock
From: SJ Park
Date: Tue Jun 30 2026 - 10:04:18 EST
Hello Igor,
Thank you for this patch.
>From next time, please give enough time for others to comment before posting a
new revision of the patch.
Also, please post a new revision as a new thread with a changelog [1] including
links to previous revisions, rather than a reply to the previous revision.
On Tue, 30 Jun 2026 16:02:53 +0300 Igor Putko <igorpetindev@xxxxxxxxx> wrote:
> __damon_va_three_regions() is called only by damon_va_three_regions(),
> which already holds mmap_read_lock(). Since mmap_read_lock() is held,
> the maple tree and VMA list are protected from concurrent changes.
> Remove the unnecessary rcu_read_lock() and rcu_read_unlock() calls.
This is not explaining the test part change. Could you please update for that?
Also, have you had a chance to theoretically or experiemently confirm the
problem [2] that motivated to add the rcu_read_lock() at that place is not
reintroduced by this change? If so, could you please add that to the commit
log, too?
Thanks,
SJ
[1] https://docs.kernel.org/process/submitting-patches.html#commentary
[2] https://lore.kernel.org/b83651a0-5b24-4206-b860-cb54ffdf209b@xxxxxxxxxxxx
[...]