Re: [PATCH v3] mm/khugepaged: replace mutex_lock/mutex_unlock usage with guard macro

Andrew Morton <[email protected]> Fri, 31 Jul 2026 11:25:41 -0700
Newsgroups dev.linux.lists.linux-kernel-mentees,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
On Fri, 31 Jul 2026 11:33:47 +0100 Pedro Falcato <[email protected]> wrote:

> On Thu, Jul 30, 2026 at 10:47:24PM +0200, Jakov Novak wrote:
> > Currently, khugepaged locks the khugepaged_mutex in two functions:
> > start_stop_khugepaged and khugepaged_min_free_kbytes_update. Remove
> > mutex_lock/mutex_unlock usage in these functions and replace it with the
> > guard macro. This makes the code more readable (removing a goto statement)
> > and makes it harder to introduce bugs in the future.
> > No functional changes introduced.
> > 
> > Signed-off-by: Jakov Novak <[email protected]>
> > Reviewed-by: Dev Jain <[email protected]>
> > Reviewed-by: Lorenzo Stoakes (ARM) <[email protected]>
> > Reviewed-by: Andrew Morton <[email protected]>
> 
> Hmm, did Andrew actually give this R-b tag out? I can't find it on-list. 

I don't think so.  Hallucination ;)

I do sometimes sneak in an offlist R-b when I'm looking at things but
I'm pretty inconsistent and lazy about it.

<looks at it again>

Reviewed-by: Andrew Morton <[email protected]>