linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Matthew Wilcox <willy@infradead.org>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
	lsf-pc@lists.linux-foundation.org,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Michal Hocko <mhocko@kernel.org>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [LSF/MM TOPIC] Non standard size THP
Date: Wed, 13 Feb 2019 16:28:00 +0300	[thread overview]
Message-ID: <20190213132800.dekg525rhrjn3cmj@kshutemo-mobl1> (raw)
In-Reply-To: <20190213130647.GQ12668@bombadil.infradead.org>

On Wed, Feb 13, 2019 at 05:06:47AM -0800, Matthew Wilcox wrote:
> On Tue, Feb 12, 2019 at 11:33:31AM +0300, Kirill A. Shutemov wrote:
> > To consider it seriously we need to understand what it means for
> > split_huge_p?d()/split_huge_page()? How khugepaged will deal with this?
> > 
> > In particular, I'm worry to expose (to user or CPU) page table state in
> > the middle of conversion (huge->small or small->huge). Handling this on
> > page table level provides a level atomicity that you will not have.
> 
> We could do an RCU-style trick where (eg) for merging 16 consecutive
> entries together, we allocate a new PTE leaf, take the mmap_sem for write,
> copy the page table over, update the new entries, then put the new leaf
> into the PMD level.  Then iterate over the old PTE leaf again, and set
> any dirty bits in the new leaf which were set during the race window.
> 
> Does that cover all the problems?

Probably, but it will kill scalability. Taking mmap_sem for write to
handle page fault or MADV_DONTNEED will not make anybody happy.

-- 
 Kirill A. Shutemov


      reply	other threads:[~2019-02-13 13:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  2:13 Anshuman Khandual
2019-02-08  4:24 ` Matthew Wilcox
2019-02-08  6:31   ` Anshuman Khandual
2019-02-12  8:33 ` Kirill A. Shutemov
2019-02-13 12:50   ` Anshuman Khandual
2019-02-13 13:38     ` Michal Hocko
2019-02-14  3:41       ` Anshuman Khandual
2019-02-13 13:48     ` Kirill A. Shutemov
2019-02-13 13:06   ` Matthew Wilcox
2019-02-13 13:28     ` 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=20190213132800.dekg525rhrjn3cmj@kshutemo-mobl1 \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    --cc=mhocko@kernel.org \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.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