[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190531070004.2dwa2cjol2q7yq4u@box.shutemov.name>
Date: Fri, 31 May 2019 10:00:04 +0300
From: "Kirill A. Shutemov" <kirill@...temov.name>
To: Song Liu <songliubraving@...com>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux-MM <linux-mm@...ck.org>,
"namit@...are.com" <namit@...are.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"oleg@...hat.com" <oleg@...hat.com>,
"rostedt@...dmis.org" <rostedt@...dmis.org>,
"mhiramat@...nel.org" <mhiramat@...nel.org>,
"matthew.wilcox@...cle.com" <matthew.wilcox@...cle.com>,
"kirill.shutemov@...ux.intel.com" <kirill.shutemov@...ux.intel.com>,
Kernel Team <Kernel-team@...com>,
"william.kucharski@...cle.com" <william.kucharski@...cle.com>,
"chad.mynhier@...cle.com" <chad.mynhier@...cle.com>,
"mike.kravetz@...cle.com" <mike.kravetz@...cle.com>
Subject: Re: [PATCH uprobe, thp 4/4] uprobe: collapse THP pmd after removing
all uprobes
On Thu, May 30, 2019 at 05:26:38PM +0000, Song Liu wrote:
>
>
> > On May 30, 2019, at 5:20 AM, Kirill A. Shutemov <kirill@...temov.name> wrote:
> >
> > On Wed, May 29, 2019 at 02:20:49PM -0700, Song Liu wrote:
> >> After all uprobes are removed from the huge page (with PTE pgtable), it
> >> is possible to collapse the pmd and benefit from THP again. This patch
> >> does the collapse.
> >
> > I don't think it's right way to go. We should deferred it to khugepaged.
> > We need to teach khugepaged to deal with PTE-mapped compound page.
> > And uprobe should only kick khugepaged for a VMA. Maybe synchronously.
> >
>
> I guess that would be the same logic, but run in khugepaged? It doesn't
> have to be done synchronously.
My idea was that since we have all required locking in place we can call
into khugepaged code that does the collapse, without waithing for it to
get to the VMA.
--
Kirill A. Shutemov
Powered by blists - more mailing lists