diff options
author | 2024-06-08 09:13:58 +1200 | |
---|---|---|
committer | 2024-07-03 19:30:07 -0700 | |
commit | 20dfa5b7adc5a1f8b5b7ff9b014d0bd1845c990b (patch) | |
tree | f44e68f410f5295568d4e30c2c344c264fa5cc5e /mm/page_io.c | |
parent | mm: introduce pmd|pte_needs_soft_dirty_wp helpers for softdirty write-protect (diff) | |
download | wireguard-linux-20dfa5b7adc5a1f8b5b7ff9b014d0bd1845c990b.tar.xz wireguard-linux-20dfa5b7adc5a1f8b5b7ff9b014d0bd1845c990b.zip |
mm: set pte writable while pte_soft_dirty() is true in do_swap_page()
This patch leverages the new pte_needs_soft_dirty_wp() helper to optimize
a scenario where softdirty is enabled, but the softdirty flag has already
been set in do_swap_page(). In this situation, we can use pte_mkwrite
instead of applying write-protection since we don't depend on write
faults.
Link: https://lkml.kernel.org/r/20240607211358.4660-3-21cnbao@gmail.com
Signed-off-by: Barry Song <v-songbaohua@oppo.com>
Suggested-by: David Hildenbrand <david@redhat.com>
Acked-by: David Hildenbrand <david@redhat.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: Kairui Song <kasong@tencent.com>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Ryan Roberts <ryan.roberts@arm.com>
Cc: Suren Baghdasaryan <surenb@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/page_io.c')
0 files changed, 0 insertions, 0 deletions