mbox series

[v3,0/3] mm: improve pte updates and dirty/accessed

Message ID 20201220045535.848591-1-npiggin@gmail.com (mailing list archive)
Headers show
Series mm: improve pte updates and dirty/accessed | expand

Message

Nicholas Piggin Dec. 20, 2020, 4:55 a.m. UTC
Time to get this old series out again. Since last time, Bibo found a
couple of the same cases I did (for MIPS only) which I extend to all
archs, and I dropped the "make the pte dirty if the fork parent was
dirty" due to Linus pointing out a dirty PTE costs more to unmap. It
didn't seem to help a great deal anyway on the access-side fortunately.

Thanks,
Nick

Nicholas Piggin (3):
  mm/cow: don't bother write protecting already write-protected huge
    pages
  mm/cow: optimise pte accessed bit handling in fork
  mm: optimise pte dirty/accessed bit setting by demand based pte
    insertion

 arch/mips/include/asm/pgtable.h |  2 --
 include/linux/pgtable.h         | 16 ----------------
 mm/huge_memory.c                | 16 ++++++++++------
 mm/hugetlb.c                    |  2 +-
 mm/memory.c                     | 15 +++++++--------
 mm/migrate.c                    |  1 +
 mm/shmem.c                      |  1 +
 mm/userfaultfd.c                |  2 +-
 mm/vmscan.c                     |  5 +++++
 9 files changed, 26 insertions(+), 34 deletions(-)

Comments

Linus Torvalds Dec. 20, 2020, 6 p.m. UTC | #1
On Sat, Dec 19, 2020 at 8:55 PM Nicholas Piggin <npiggin@gmail.com> wrote:
>
> Time to get this old series out again. Since last time, Bibo found a
> couple of the same cases I did (for MIPS only) which I extend to all
> archs, and I dropped the "make the pte dirty if the fork parent was
> dirty" due to Linus pointing out a dirty PTE costs more to unmap. It
> didn't seem to help a great deal anyway on the access-side fortunately.

Looks ok to me. I'm surprised it's all that noticeable, but I don't
see anything worrisome in the patches.

            Linus