]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/thp: carry over dirty bit when thp splits on pmd
authorPeter Xu <peterx@redhat.com>
Thu, 11 Aug 2022 16:13:28 +0000 (12:13 -0400)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 17 Aug 2022 20:58:30 +0000 (13:58 -0700)
commit6037d42b09241dedafd9d1b133b37d381e396cf8
tree1333f5df22fc194fe845d454efe4920c4a3a4722
parentbc2a252518b3a7e2367f776c997a32a3ede239fb
mm/thp: carry over dirty bit when thp splits on pmd

Carry over the dirty bit from pmd to pte when a huge pmd splits.  It
shouldn't be a correctness issue since when pmd_dirty() we'll have the
page marked dirty anyway, however having dirty bit carried over helps the
next initial writes of split ptes on some archs like x86.

Link: https://lkml.kernel.org/r/20220811161331.37055-5-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Huang Ying <ying.huang@intel.com>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Andi Kleen <andi.kleen@intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: David Hildenbrand <david@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: "Kirill A . Shutemov" <kirill@shutemov.name>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nadav Amit <nadav.amit@gmail.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/huge_memory.c