lkml.org 
[lkml]   [2020]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH, RFC] x86/mm/pat: Restore large pages after fragmentation
    From
    Date
    On 4/16/20 2:32 PM, Kirill A. Shutemov wrote:
    > With current code it's one way road: kernel tries to avoid splitting
    > large pages, but it doesn't restore them back even if page attributes
    > got compatible again.

    Looks pretty sane to me, and sounds like something we've needed for a
    long time.

    I'd having doubts in my ability to find nasty corner cases in this code,
    though. Could you rig up some tests to poke at this thing further? Maybe:

    Record what the direct map looks like (even from userspace). Then,
    allocate some memory, including odd-sized and aligned ranges. Try to do
    things >4M like the hugetlbfs code does. Make the allocation (or a
    piece of it) not-present (or whatever), which usually fractures some
    large pages. Then put it back the way it was. All the large pages
    should come back.

    If it survives that for an hour or two, it should be pretty good to go.
    Basically, fuzz it.

    \
     
     \ /
      Last update: 2020-04-17 00:05    [W:2.389 / U:0.228 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site