linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Barry Song <21cnbao@gmail.com>
To: akpm@linux-foundation.org, david@redhat.com, linux-mm@kvack.org
Cc: chrisl@kernel.org, kasong@tencent.com,
	linux-kernel@vger.kernel.org, minchan@kernel.org,
	ryan.roberts@arm.com, surenb@google.com, v-songbaohua@oppo.com,
	willy@infradead.org
Subject: [PATCH v2 0/2] mm: introduce pmd|pte_needs_soft_dirty_wp helpers and utilize them
Date: Sat,  8 Jun 2024 09:13:56 +1200	[thread overview]
Message-ID: <20240607211358.4660-1-21cnbao@gmail.com> (raw)

From: Barry Song <v-songbaohua@oppo.com>

This patchset introduces the pte_need_soft_dirty_wp and pmd_need_soft_dirty_wp
helpers to determine if write protection is required for softdirty tracking.
These helpers enhance code readability and improve the overall appearance.

They are then utilized in gup, mprotect, swap, and other related functions.

-v2:
 * rename "need" to "needs" per David;
 * separate the change of do_swap_page() per david;

Thanks to David for his original suggestions on this[1].
[1] https://lore.kernel.org/linux-mm/baf84b51-7e8a-4da8-9662-3f5cf14ad6f6@redhat.com/

Barry Song (2):
  mm: introduce pmd|pte_needs_soft_dirty_wp helpers for softdirty
    write-protect
  mm: set pte writable while pmd_soft_dirty() is true in do_swap_page()

 mm/gup.c         |  4 ++--
 mm/huge_memory.c |  2 +-
 mm/internal.h    | 10 ++++++++++
 mm/memory.c      |  2 +-
 mm/mprotect.c    |  2 +-
 5 files changed, 15 insertions(+), 5 deletions(-)

-- 
2.34.1



             reply	other threads:[~2024-06-07 21:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07 21:13 Barry Song [this message]
2024-06-07 21:13 ` [PATCH v2 1/2] mm: introduce pmd|pte_needs_soft_dirty_wp helpers for softdirty write-protect Barry Song
2024-06-07 21:13 ` [PATCH v2 2/2] mm: set pte writable while pte_soft_dirty() is true in do_swap_page() Barry Song
2024-06-10  8:32   ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240607211358.4660-1-21cnbao@gmail.com \
    --to=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=chrisl@kernel.org \
    --cc=david@redhat.com \
    --cc=kasong@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ryan.roberts@arm.com \
    --cc=surenb@google.com \
    --cc=v-songbaohua@oppo.com \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox