From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Laura Abbott <labbott@redhat.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/khugepaged: Convert VM_BUG_ON() to collapse fail
Date: Fri, 16 Mar 2018 13:05:10 +0300 [thread overview]
Message-ID: <20180316100510.gedh6svgemb5jrmj@black.fi.intel.com> (raw)
In-Reply-To: <20180315160453.dff17cfe3dca056dabc98b9e@linux-foundation.org>
On Thu, Mar 15, 2018 at 11:04:53PM +0000, Andrew Morton wrote:
> On Thu, 15 Mar 2018 18:23:53 +0300 "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> wrote:
>
> > khugepaged is not yet able to convert PTE-mapped huge pages back to PMD
> > mapped. We do not collapse such pages. See check khugepaged_scan_pmd().
> >
> > But if between khugepaged_scan_pmd() and __collapse_huge_page_isolate()
> > somebody managed to instantiate THP in the range and then split the PMD
> > back to PTEs we would have a problem -- VM_BUG_ON_PAGE(PageCompound(page))
> > will get triggered.
> >
> > It's possible since we drop mmap_sem during collapse to re-take for
> > write.
> >
> > Replace the VM_BUG_ON() with graceful collapse fail.
> >
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> > Fixes: b1caa957ae6d ("khugepaged: ignore pmd tables with THP mapped with ptes")
>
> Jan 2016. Do we need a cc:stable?
Yes, please. I forgot to put it.
--
Kirill A. Shutemov
prev parent reply other threads:[~2018-03-16 10:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-15 15:23 Kirill A. Shutemov
2018-03-15 23:04 ` Andrew Morton
2018-03-16 10:05 ` Kirill A. Shutemov [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=20180316100510.gedh6svgemb5jrmj@black.fi.intel.com \
--to=kirill.shutemov@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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