From: Michal Hocko <mhocko@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Will Deacon <will.deacon@arm.com>,
Minchan Kim <minchan@kernel.org>,
Andrea Argangeli <andrea@kernel.org>,
Ingo Molnar <mingo@redhat.com>, linux-mm <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] arch, mm: introduce arch_tlb_gather_mmu_exit
Date: Tue, 5 Dec 2017 20:14:37 +0100 [thread overview]
Message-ID: <20171205191410.f2rvaluftnd6dqer@dhcp22.suse.cz> (raw)
In-Reply-To: <CA+55aFw3NKzVO3xivjV1MzFH_wC1-eVAvgkHjpp7T7__CF6+eg@mail.gmail.com>
On Tue 05-12-17 10:31:12, Linus Torvalds wrote:
> On Tue, Dec 5, 2017 at 6:58 AM, Michal Hocko <mhocko@kernel.org> wrote:
> >
> > This all is nice but tlb_gather users are not aware of that and this can
> > actually cause some real problems. E.g. the oom_reaper tries to reap the
> > whole address space but it might race with threads accessing the memory [1].
> > It is possible that soft-dirty handling might suffer from the same
> > problem [2] as soon as it starts supporting the feature.
>
> So we fixed the oom reaper to just do proper TLB invalidates in commit
> 687cb0884a71 ("mm, oom_reaper: gather each vma to prevent leaking TLB
> entry").
>
> So now "fullmm" should be the expected "exit" case, and it all should
> be unambiguous.
>
> Do we really have any reason to apply this patch any more?
Well, the point was the clarity. The bad behavior came as a surprise for
the oom reaper and as Minchan mentioned we would see a similar problem
with soft-dirty bits as soon as they are supported on arm64 or
potentially other architectures which might do special handling for exit
case.
So strictly speaking, this doesn't fix any known bug to me. But I would
find it more robust if the very special handling was explicit.
--
Michal Hocko
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-12-05 19:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 14:58 Michal Hocko
2017-12-05 18:31 ` Linus Torvalds
2017-12-05 19:14 ` Michal Hocko [this message]
2017-12-14 14:05 ` Michal Hocko
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=20171205191410.f2rvaluftnd6dqer@dhcp22.suse.cz \
--to=mhocko@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=andrea@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=mingo@redhat.com \
--cc=torvalds@linux-foundation.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