From: Matthew Wilcox <willy@infradead.org>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Mina Almasry <almasrymina@google.com>,
netdev@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Simon Horman <horms@kernel.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Jakub Kicinski <kuba@kernel.org>,
David Miller <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH net-next v1] mm: fix build on powerpc with GCC 14
Date: Sun, 15 Sep 2024 11:44:58 +0100 [thread overview]
Message-ID: <Zua6qtUCG84236gp@casper.infradead.org> (raw)
In-Reply-To: <30e8dee7-e98e-42cb-aab3-6b75f1a6316d@csgroup.eu>
On Sat, Sep 14, 2024 at 08:50:46AM +0200, Christophe Leroy wrote:
> Hi,
>
> Le 13/09/2024 à 21:22, Matthew Wilcox a écrit :
> > On Fri, Sep 13, 2024 at 07:20:36PM +0000, Mina Almasry wrote:
> > > +++ b/include/linux/page-flags.h
> > > @@ -239,8 +239,8 @@ static inline unsigned long _compound_head(const struct page *page)
> > > {
> > > unsigned long head = READ_ONCE(page->compound_head);
> > > - if (unlikely(head & 1))
> > > - return head - 1;
> > > + if (unlikely(head & 1UL))
> > > + return head & ~1UL;
> > > return (unsigned long)page_fixed_fake_head(page);
> >
> > NAK, that pessimises compound_head().
> >
>
> Can you please give more details on what the difference is ?
>
> I can't see what it pessimises. In both cases, you test if the value is odd,
> when it is odd you make it even.
On x86, for example, it is perfectly valid to load a 64-bit value from
an offset of 0x2f relative to a pointer. So there's no need to make it
even.
prev parent reply other threads:[~2024-09-15 10:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-13 19:20 [PATCH net-next v1] mm: fix build on powerpc with GCC 14 Mina Almasry
2024-09-13 19:22 ` Matthew Wilcox
2024-09-14 6:50 ` Christophe Leroy
2024-09-15 10:44 ` Matthew Wilcox [this message]
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=Zua6qtUCG84236gp@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=almasrymina@google.com \
--cc=arnd@arndb.de \
--cc=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-next@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).