linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Nadav Amit <nadav.amit@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm <linux-mm@kvack.org>,
	Andrea Arcangeli <aarcange@redhat.com>,
	Andy Lutomirski <luto@kernel.org>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Will Deacon <will@kernel.org>, Yu Zhao <yuzhao@google.com>,
	Nick Piggin <npiggin@gmail.com>,
	x86@kernel.org
Subject: Re: [RESEND PATCH v5 2/3] mm/mprotect: do not flush when not required architecturally
Date: Wed, 23 Mar 2022 15:09:58 -0700	[thread overview]
Message-ID: <7CAC2587-6C39-4286-9DED-5FC8588B5513@gmail.com> (raw)
In-Reply-To: <20220320000719.1533862-3-namit@vmware.com>



> On Mar 19, 2022, at 5:07 PM, Nadav Amit <nadav.amit@gmail.com> wrote:
> 
> From: Nadav Amit <namit@vmware.com>
> 
> Currently, using mprotect() to unprotect a memory region or uffd to
> unprotect a memory region causes a TLB flush. However, in such cases the
> PTE is often not modified (i.e., remain RO) and therefore not TLB flush
> is needed.
> 
> Add an arch-specific pte_needs_flush() which tells whether a TLB flush
> is needed based on the old PTE and the new one. Implement an x86
> pte_needs_flush().
> 
> Always flush the TLB when it is architecturally needed even when
> skipping a TLB flush might only result in a spurious page-faults by
> skipping the flush.


Errr.. Sent the wrong version. Will resend with new version number.


  reply	other threads:[~2022-03-23 22:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220320000719.1533862-1-namit@vmware.com>
2022-03-20  0:07 ` Nadav Amit
2022-03-23 22:09   ` Nadav Amit [this message]
2022-03-20  0:07 ` [RESEND PATCH v5 3/3] mm: avoid unnecessary flush on change_huge_pmd() Nadav Amit

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=7CAC2587-6C39-4286-9DED-5FC8588B5513@gmail.com \
    --to=nadav.amit@gmail.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-mm@kvack.org \
    --cc=luto@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=yuzhao@google.com \
    /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