From: Linus Torvalds <torvalds@linux-foundation.org>
To: kirill@shutemov.name
Cc: Jann Horn <jannh@google.com>,
will.deacon@arm.com, Greg KH <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
linux-mm@kvack.org, mhocko@kernel.org, hughd@google.com
Subject: Re: [PATCH] mremap: properly flush TLB before releasing the page
Date: Fri, 2 Nov 2018 09:05:17 -0700 [thread overview]
Message-ID: <CAHk-=wjTM5588YwhAYQiH7fCu0itRjHYJZ8WaG1y_bx=6JUhtQ@mail.gmail.com> (raw)
In-Reply-To: <20181102152516.dkqpeubxh6c3phl2@kshutemo-mobl1>
On Fri, Nov 2, 2018 at 8:25 AM Kirill A. Shutemov <kirill@shutemov.name> wrote:
>
> I wounder if it would be cheaper to fix this by taking i_mmap_lock_write()
> unconditionally in mremap() path rather than do a lot of flushing.
That wouldn't help. Think anonymous pages and try_to_free() rmap walk.
So then I think we'd have to take the anonvma lock or something.
And it's not like we are likely to even do any more flushes, really.
We don't flush for each page, only for each page table. So every 512
pages or so.
Linus
prev parent reply other threads:[~2018-11-02 16:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1541164962-28533-1-git-send-email-will.deacon@arm.com>
2018-11-02 14:56 ` Kirill A. Shutemov
2018-11-02 15:00 ` Jann Horn
2018-11-02 15:25 ` Kirill A. Shutemov
2018-11-02 16:05 ` Linus Torvalds [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='CAHk-=wjTM5588YwhAYQiH7fCu0itRjHYJZ8WaG1y_bx=6JUhtQ@mail.gmail.com' \
--to=torvalds@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=hughd@google.com \
--cc=jannh@google.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=will.deacon@arm.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