From: Song Liu <songliubraving@fb.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"namit@vmware.com" <namit@vmware.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"oleg@redhat.com" <oleg@redhat.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"mhiramat@kernel.org" <mhiramat@kernel.org>,
"matthew.wilcox@oracle.com" <matthew.wilcox@oracle.com>,
"kirill.shutemov@linux.intel.com"
<kirill.shutemov@linux.intel.com>,
Kernel Team <Kernel-team@fb.com>,
"william.kucharski@oracle.com" <william.kucharski@oracle.com>,
"chad.mynhier@oracle.com" <chad.mynhier@oracle.com>,
"mike.kravetz@oracle.com" <mike.kravetz@oracle.com>
Subject: Re: [PATCH uprobe, thp 1/4] mm, thp: allow preallocate pgtable for split_huge_pmd_address()
Date: Thu, 30 May 2019 17:23:15 +0000 [thread overview]
Message-ID: <DCC3D689-2E11-44CE-A74E-0ACC4E5067C9@fb.com> (raw)
In-Reply-To: <20190530111416.ph6xqd4anjlm54i6@box>
> On May 30, 2019, at 4:14 AM, Kirill A. Shutemov <kirill@shutemov.name> wrote:
>
> On Thu, May 30, 2019 at 02:10:15PM +0300, Kirill A. Shutemov wrote:
>> On Wed, May 29, 2019 at 02:20:46PM -0700, Song Liu wrote:
>>> @@ -2133,10 +2133,15 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd,
>>> VM_BUG_ON_VMA(vma->vm_end < haddr + HPAGE_PMD_SIZE, vma);
>>> VM_BUG_ON(!is_pmd_migration_entry(*pmd) && !pmd_trans_huge(*pmd)
>>> && !pmd_devmap(*pmd));
>>> + /* only file backed vma need preallocate pgtable*/
>>> + VM_BUG_ON(vma_is_anonymous(vma) && prealloc_pgtable);
>>>
>>> count_vm_event(THP_SPLIT_PMD);
>>>
>>> - if (!vma_is_anonymous(vma)) {
>>> + if (prealloc_pgtable) {
>>> + pgtable_trans_huge_deposit(mm, pmd, prealloc_pgtable);
>>> + mm_inc_nr_pmds(mm);
>>> + } else if (!vma_is_anonymous(vma)) {
>>> _pmd = pmdp_huge_clear_flush_notify(vma, haddr, pmd);
>>> /*
>>> * We are going to unmap this huge page. So
>>
>> Nope. This going to leak a page table for architectures where
>> arch_needs_pgtable_deposit() is true.
>
> And I don't there's correct handling of dirty bit.
>
> And what about DAX? Will it blow up? I think so.
>
Let me look into these cases. Thanks for the feedback!
Song
> --
> Kirill A. Shutemov
next prev parent reply other threads:[~2019-05-30 17:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190529212049.2413886-1-songliubraving@fb.com>
[not found] ` <20190529212049.2413886-4-songliubraving@fb.com>
2019-05-30 11:08 ` [PATCH uprobe, thp 3/4] uprobe: support huge page by only splitting the pmd William Kucharski
2019-05-30 17:24 ` Song Liu
2019-05-30 12:14 ` Kirill A. Shutemov
2019-05-30 17:37 ` Song Liu
[not found] ` <20190529212049.2413886-2-songliubraving@fb.com>
2019-05-30 11:10 ` [PATCH uprobe, thp 1/4] mm, thp: allow preallocate pgtable for split_huge_pmd_address() Kirill A. Shutemov
2019-05-30 11:14 ` Kirill A. Shutemov
2019-05-30 17:23 ` Song Liu [this message]
[not found] ` <20190529212049.2413886-3-songliubraving@fb.com>
2019-05-30 11:17 ` [PATCH uprobe, thp 2/4] uprobe: use original page when all uprobes are removed Kirill A. Shutemov
2019-05-30 17:18 ` Song Liu
[not found] ` <20190529212049.2413886-5-songliubraving@fb.com>
2019-05-30 12:20 ` [PATCH uprobe, thp 4/4] uprobe: collapse THP pmd after removing all uprobes Kirill A. Shutemov
2019-05-30 17:26 ` Song Liu
2019-05-31 7:00 ` Kirill A. Shutemov
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=DCC3D689-2E11-44CE-A74E-0ACC4E5067C9@fb.com \
--to=songliubraving@fb.com \
--cc=Kernel-team@fb.com \
--cc=chad.mynhier@oracle.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=matthew.wilcox@oracle.com \
--cc=mhiramat@kernel.org \
--cc=mike.kravetz@oracle.com \
--cc=namit@vmware.com \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=william.kucharski@oracle.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
all inboxes | Powered by JetHome®