Re: [PATCH v3 1/3] mm: add get_and_clear_ptes() and clear_ptes()

From: Andrew Morton
Date: Tue Jul 22 2025 - 16:47:35 EST


On Tue, 22 Jul 2025 20:35:57 +0530 Dev Jain <dev.jain@xxxxxxx> wrote:

> Let's add variants to be used where "full" does not apply -- which will
> be the majority of cases in the future. "full" really only applies if
> we are about to tear down a full MM.
>
> Use get_and_clear_ptes() in existing code, clear_ptes() users will
> be added next.
>
> Should we make these inline functions instead and add separate docs?

inlined functions would be preferable.

> Probably not worth it for now.

Well, as David has called for a v4 I suggest you make that change.

Thanks, I'll queue the series in mm-new for a bit of testing.