From: "Vishal Moola (Oracle)" <vishal.moola@gmail.com>
To: Ye Liu <ye.liu@linux.dev>
Cc: Matthew Wilcox <willy@infradead.org>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, Markus.Elfring@web.de,
Ye Liu <liuye@kylinos.cn>,
Sidhartha Kumar <sidhartha.kumar@oracle.com>,
Anshuman Khandual <anshuman.khandual@arm.com>
Subject: Re: [PATCH v4] mm/page_alloc: Consolidate unlikely handling in page_expected_state
Date: Wed, 2 Apr 2025 20:55:37 -0700 [thread overview]
Message-ID: <Z-4GuZZ_BjFNm9Gq@fedora> (raw)
In-Reply-To: <6cd78595-f9d3-4f26-8ca3-d1a0bf4e8dff@linux.dev>
On Wed, Apr 02, 2025 at 10:49:17AM +0800, Ye Liu wrote:
>
> 在 2025/3/31 23:59, Matthew Wilcox 写道:
> > On Mon, Mar 31, 2025 at 08:08:01PM +0800, Ye Liu wrote:
> >> 在 2025/3/28 22:29, Matthew Wilcox 写道:
> >>> On Fri, Mar 28, 2025 at 09:47:57AM +0800, Ye Liu wrote:
> >>>> Consolidate the handling of unlikely conditions in the
> >>>> page_expected_state() function to reduce code duplication and improve
> >>>> readability.
> >>> I don't think this is an equivalent transformation.
> >> Could you explain it in detail?
> > page_expected_state() is called both at free and alloc. I think
> > the correct behaviour on encountering a HWPOISON page should be
> > different at alloc and free, don't you?
> In the alloc process, this patch does not modify the code behavior.
> Regarding the free process, the if (unlikely(PageHWPoison(page)) && !order)
> code handles the case where order is 0. When order is not 0, it does not
> matter if __ClearPageBuddy is used to process the last page of the compound
> page, because page->flags &= ~PAGE_FLAGS_CHECK_AT_PREP; will also clear it.
> Is that right?
I believe a page's "Buddy" flag is stored in page->type, so maybe this
won't do what you expect?
next prev parent reply other threads:[~2025-04-03 3:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-28 1:47 [PATCH v4] mm/page_alloc: Consolidate unlikely handling in page_expected_state Ye Liu
2025-03-28 9:44 ` Markus Elfring
2025-03-28 14:29 ` Matthew Wilcox
2025-03-31 12:08 ` Ye Liu
2025-03-31 12:21 ` [v4] " Markus Elfring
2025-03-31 12:51 ` Ye Liu
2025-03-31 13:15 ` Markus Elfring
2025-03-31 15:53 ` Matthew Wilcox
2025-04-02 2:51 ` Ye Liu
2025-03-31 15:59 ` [PATCH v4] " Matthew Wilcox
2025-04-02 2:49 ` Ye Liu
2025-04-03 3:55 ` Vishal Moola (Oracle) [this message]
2025-04-03 5:58 ` Ye Liu
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=Z-4GuZZ_BjFNm9Gq@fedora \
--to=vishal.moola@gmail.com \
--cc=Markus.Elfring@web.de \
--cc=akpm@linux-foundation.org \
--cc=anshuman.khandual@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liuye@kylinos.cn \
--cc=sidhartha.kumar@oracle.com \
--cc=willy@infradead.org \
--cc=ye.liu@linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.