On 18 Jul 2025, at 5:02, Dev Jain wrote:
Patch 6 optimizes mprotect() by batch clearing the ptes, masking in the new“Patch 6” might not make sense when reading it in the git log. Something like
below might be better:
mprotect() will be optimized by batch clearing the ptes, masking in the new
protections, and batch setting the ptes in an upcoming commit.
No need to repin for this one.
protections, and batch setting the ptes. Suppose that the first pteLGTM. Reviewed-by: Zi Yan <ziy@xxxxxxxxxx>
of the batch is writable - with the current implementation of
folio_pte_batch(), it is not guaranteed that the other ptes in the batch
are already writable too, so we may incorrectly end up setting the
writable bit on all ptes via modify_prot_commit_ptes().
Therefore, introduce FPB_RESPECT_WRITE so that all ptes in the batch
are writable or not.
Signed-off-by: Dev Jain <dev.jain@xxxxxxx>
---
mm/internal.h | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Best Regards,
Yan, Zi