From: Peter Xu <peterx@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Peter Collingbourne <pcc@google.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Nadav Amit <nadav.amit@gmail.com>,
Dave Hansen <dave.hansen@intel.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Yang Shi <shy828301@gmail.com>, Hugh Dickins <hughd@google.com>,
Mel Gorman <mgorman@techsingularity.net>
Subject: Re: [PATCH v3] mm/mprotect: try avoiding write faults for exclusive anonymous pages when changing protection
Date: Wed, 15 Jun 2022 16:16:53 -0400 [thread overview]
Message-ID: <Yqo+NQBbEk1SU0cO@xz-m1.local> (raw)
In-Reply-To: <3f190cd4-df87-feeb-bae4-56348498fa82@redhat.com>
On Wed, Jun 15, 2022 at 09:52:11PM +0200, David Hildenbrand wrote:
> write unprotection is a change from RO->RW, so I don't immediately see
> the difference.
In my view "unprotect a pte" is only a subset of "grant pte write
permission", since: "unprotect" has a prerequisite that it used to be
"protected" so that's why we can unprotect. Aka, in mm term that's only
when VM_WRITE set.
So basically it is a hint that we're only working on VM_WRITE regions,
where I thought "unprotect" was slightly better.
>
> Anyhow, I don't like the sounding of TRY_WRITE_UNPROTECT.
>
> I made it match the function name that I had:
>
> MM_CP_TRY_CHANGE_WRITABLE
> -> !pte_write()?
> -> can_change_pte_writable() ?
> ->pte_mkwrite()
>
> Maybe MM_CP_TRY_MAKE_WRITABLE / MM_CP_TRY_MAKE_PTE_WRITABLE is clearer?
>
> Open for suggestions because I'm apparently not the bast at naming
> things either.
Me neither. I don't have a strong opinion anyway, and frankly indeed the
old naming is not great either to me. Maybe there's better thoughts.
Thanks,
--
Peter Xu
prev parent reply other threads:[~2022-06-15 20:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-14 9:36 David Hildenbrand
2022-06-15 15:25 ` Peter Xu
2022-06-15 19:52 ` David Hildenbrand
2022-06-15 20:16 ` Peter Xu [this message]
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=Yqo+NQBbEk1SU0cO@xz-m1.local \
--to=peterx@redhat.com \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=david@redhat.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=nadav.amit@gmail.com \
--cc=pcc@google.com \
--cc=shy828301@gmail.com \
--cc=torvalds@linux-foundation.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