linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Yu Zhao <yuzhao@google.com>
To: David Hildenbrand <david@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	 Andrew Morton <akpm@linux-foundation.org>,
	Zi Yan <ziy@nvidia.com>,  Vlastimil Babka <vbabka@suse.cz>
Subject: Re: [PATCH v1 1/2] mm/page_alloc: conditionally split > pageblock_order pages in free_one_page() and move_freepages_block_isolate()
Date: Fri, 6 Dec 2024 23:48:51 -0700	[thread overview]
Message-ID: <CAOUHufbYxEByFv6H8kgbrAkgzkoNb=PTY1zBO0-Mniz6ADtk3A@mail.gmail.com> (raw)
In-Reply-To: <20241206095951.98007-2-david@redhat.com>

On Fri, Dec 6, 2024 at 3:00 AM David Hildenbrand <david@redhat.com> wrote:
>
> Let's special-case for the common scenarios that:
>
> (a) We are freeing pages <= pageblock_order
> (b) We are freeing a page <= MAX_PAGE_ORDER and all pageblocks match
>     (especially, no mixture of isolated and non-isolated pageblocks)
>
> When we encounter a > MAX_PAGE_ORDER page, it can only come from
> alloc_contig_range(), and we can process MAX_PAGE_ORDER chunks.
>
> When we encounter a >pageblock_order <= MAX_PAGE_ORDER page,
> check whether all pageblocks match, and if so (common case), don't
> split them up just for the buddy to merge them back.
>
> This makes sure that when we free MAX_PAGE_ORDER chunks to the buddy,
> for example during system startups, memory onlining, or when isolating
> consecutive pageblocks via alloc_contig_range()/memory offlining, that
> we don't unnecessarily split up what we'll immediately merge again,
> because the migratetypes match.
>
> Rename split_large_buddy() to __free_one_page_maybe_split(), to make it
> clearer what's happening, and handle in it only natural buddy orders,
> not the alloc_contig_range(__GFP_COMP) special case: handle that in
> free_one_page() only.
>
> Signed-off-by: David Hildenbrand <david@redhat.com>

Acked-by: Yu Zhao <yuzhao@google.com>


  parent reply	other threads:[~2024-12-07  6:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06  9:59 [PATCH v1 0/2] mm/page_alloc: rework conditional splitting >= pageblock_order pages when freeing David Hildenbrand
2024-12-06  9:59 ` [PATCH v1 1/2] mm/page_alloc: conditionally split > pageblock_order pages in free_one_page() and move_freepages_block_isolate() David Hildenbrand
2024-12-06 16:58   ` Zi Yan
2024-12-07  6:48   ` Yu Zhao [this message]
2024-12-09 19:01   ` Vlastimil Babka
2024-12-09 19:23     ` Zi Yan
2024-12-09 21:35       ` David Hildenbrand
2024-12-09 21:42         ` Zi Yan
2024-12-09 22:10           ` David Hildenbrand
2024-12-09 21:36       ` Vlastimil Babka
2024-12-10  9:39     ` David Hildenbrand
2024-12-06  9:59 ` [PATCH v1 2/2] mm/page_isolation: fixup isolate_single_pageblock() comment regarding splitting free pages David Hildenbrand
2024-12-06 16:59   ` Zi Yan
2024-12-09 22:13   ` Vlastimil Babka

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='CAOUHufbYxEByFv6H8kgbrAkgzkoNb=PTY1zBO0-Mniz6ADtk3A@mail.gmail.com' \
    --to=yuzhao@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vbabka@suse.cz \
    --cc=ziy@nvidia.com \
    /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