lkml.org 
[lkml]   [2019]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [LSF/MM TOPIC] Non standard size THP
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?

> Honestly, I'm very skeptical about the idea. It took a lot of time to
> stabilize THP for singe page size, equal to PMD page table, but this looks
> like a new can of worms. :P

It's definitely a lot of work, and it has a lot of prerequisites.

\
 
 \ /
  Last update: 2019-02-13 14:09    [W:0.098 / U:2.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site