archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <>
To: "Kirill A. Shutemov" <>,
	Andy Lutomirski <>,
	Peter Zijlstra <>,
	Thomas Gleixner <>,
	Ingo Molnar <>, Borislav Petkov <>,
	"H. Peter Anvin" <>
Subject: Re: [PATCH, RFC] x86/mm/pat: Restore large pages after fragmentation
Date: Thu, 16 Apr 2020 15:03:12 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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.

  reply	other threads:[~2020-04-16 22:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-16 21:32 [PATCH, RFC] x86/mm/pat: Restore large pages after fragmentation Kirill A. Shutemov
2020-04-16 22:03 ` Dave Hansen [this message]
2020-04-16 22:12   ` Kirill A. Shutemov
2020-04-16 22:38     ` Dave Hansen
2020-04-17  0:52 ` Mika Penttilä
2020-04-17 11:42   ` Kirill A. Shutemov
2020-04-17 12:05     ` Mika Penttilä
2020-04-17 12:18 ` Peter Zijlstra
2020-04-17 14:42   ` Kirill A. Shutemov
2020-04-17 15:17     ` Peter Zijlstra
2020-04-17 15:47 ` Peter Zijlstra
2020-04-17 16:54   ` Kirill A. Shutemov
2020-04-25 11:43 ` [x86/mm/pat] ae64ac1a83: BUG:Bad_page_state_in_process kernel test robot

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).