Re: [RFC PATCH v1] mm: improve call_controls_lock
From: SeongJae Park
Date: Wed Dec 31 2025 - 00:01:43 EST
On Tue, 30 Dec 2025 12:02:31 +0300 Gutierrez Asier <gutierrez.asier@xxxxxxxxxxxxxxxxxxx> wrote:
>
>
> On 12/29/2025 6:22 PM, SeongJae Park wrote:
> > Hello Asier,
>
> Hi SeongJae,
>
> >
> > Thank you for sending this patch!
> >
> > On Mon, 29 Dec 2025 14:55:32 +0000 Asier Gutierrez <gutierrez.asier@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> >> This is a minor patch set for a call_controls_lock synchronization improvement.
> >
> > Please break description lines to not exceed 75 characters per line.
> >
> >>
> >> Spinlocks are faster than mutexes, even when the mutex takes the fast
> >> path. Hence, this patch replaces the mutex call_controls_lock with a spinlock.
> >
> > But call_controls_lock is not being used on performance critical part.
> > Actually, most of DAMON code is not performance critical. I really appreciate
> > your patch, but I have to say I don't think this change is really needed now.
> > Please let me know if I'm missing something.
>
> I was just reviewing the code and I noticed this. Yes, you are right, the performance
> is not critical.
Thank you for flexibly accepting my humble opinion.
>
> >>
> >> Initial benchmarking shows the following results
> >>
> >>
> >> # bpftrace -e 'kprobe:kdamond_call { @start[tid] = nsecs; }
> >
> > Commit log shouldn't start with '#'. Please consider indenting the above
> > command and below outputs of it.
> >
> >
> > Thanks,
> > SJ
> >
> > [...]
> >
>
> Thanks a lot for the review!
My pleasure! Looking forward to your next patch :)
Thanks,
SJ
[...]