From: Wei Yang <richard.weiyang@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Wei Yang <richard.weiyang@gmail.com>,
linux-mm@kvack.org, willy@infradead.org,
David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH] mm/page_alloc: remove prefetchw() on freeing page to buddy system
Date: Wed, 3 Jul 2024 00:01:42 +0000 [thread overview]
Message-ID: <20240703000142.un3aq2gwqfca5olk@master> (raw)
In-Reply-To: <20240701232224.43d5243ec9f15aa3e29a7ec5@linux-foundation.org>
On Mon, Jul 01, 2024 at 11:22:24PM -0700, Andrew Morton wrote:
>On Tue, 2 Jul 2024 02:09:31 +0000 Wei Yang <richard.weiyang@gmail.com> wrote:
>
>> The prefetchw() is introduced from an ancient patch[1].
>>
>> The change log says:
>>
>> The basic idea is to free higher order pages instead of going
>> through every single one. Also, some unnecessary atomic operations
>> are done away with and replaced with non-atomic equivalents, and
>> prefetching is done where it helps the most. For a more in-depth
>> discusion of this patch, please see the linux-ia64 archives (topic
>> is "free bootmem feedback patch").
>>
>> So there are several changes improve the bootmem freeing, in which the
>> most basic idea is freeing higher order pages. And as Matthew says,
>> "Itanium CPUs of this era had no prefetchers."
>>
>> I did 10 round bootup tests before and after this change, the data
>> doesn't prove prefetchw() help speeding up bootmem freeing. The sum of
>> the 10 round bootmem freeing time after prefetchw() removal even 5.2%
>> faster than before.
>
>I don't think I've ever seen prefetch make a damn bit of difference.
>
>> [1]: https://lore.kernel.org/linux-ia64/40F46962.4090604@sgi.com/
>>
>> Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
>> Suggested-by: Matthew Wilcox <willy@infradead.org>
>> CC: David Hildenbrand <david@redhat.com>
>>
>> ---
>> The patch is based on mm-stable with David's change.
>
>Oh help. David makes many changes. Please identify patches with much
>care. Fully quoting the email title works, as does a link.
>
The commit is 3dadec1babf9eee0c67c967df931d6f0cb124a04
mm: pass meminit_context to __free_pages_core()
The link is, if I am correct.
https://lore.kernel.org/all/20240607090939.89524-2-david@redhat.com/
BTW, how we track the mail link? Just search in lore.kernel.org?
--
Wei Yang
Help you, Help me
next prev parent reply other threads:[~2024-07-03 0:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-02 2:09 Wei Yang
2024-07-02 6:22 ` Andrew Morton
2024-07-03 0:01 ` Wei Yang [this message]
2024-07-03 0:49 ` Andrew Morton
2024-07-03 0:55 ` Wei Yang
2024-07-02 6:57 ` David Hildenbrand
2024-07-03 0:12 ` Wei Yang
2024-07-03 8:40 ` David Hildenbrand
2024-07-04 3:30 ` Matthew Wilcox
2024-07-04 3:37 ` Andrew Morton
2024-07-04 3:39 ` Matthew Wilcox
2024-07-04 3:43 ` Andrew Morton
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=20240703000142.un3aq2gwqfca5olk@master \
--to=richard.weiyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=linux-mm@kvack.org \
--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