From: Jakub Kicinski <kuba@kernel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: David Miller <davem@davemloft.net>,
Paolo Abeni <pabeni@redhat.com>,
Mina Almasry <almasrymina@google.com>,
Networking <netdev@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: linux-next: build failure after merge of the net-next tree
Date: Fri, 13 Sep 2024 08:34:26 -0700 [thread overview]
Message-ID: <20240913083426.30aff7f4@kernel.org> (raw)
In-Reply-To: <20240913204138.7cdb762c@canb.auug.org.au>
On Fri, 13 Sep 2024 20:41:38 +1000 Stephen Rothwell wrote:
> I have bisected it (just using the net-next tree) to commit
>
> 8ab79ed50cf10f338465c296012500de1081646f is the first bad commit
> commit 8ab79ed50cf10f338465c296012500de1081646f
> Author: Mina Almasry <almasrymina@google.com>
> Date: Tue Sep 10 17:14:49 2024 +0000
>
> page_pool: devmem support
>
>
> And it may be pointing at arch/powerpc/include/asm/atomic.h line 200
> which is this:
>
> static __inline__ s64 arch_atomic64_read(const atomic64_t *v)
> {
> s64 t;
>
> /* -mprefixed can generate offsets beyond range, fall back hack */
> if (IS_ENABLED(CONFIG_PPC_KERNEL_PREFIXED))
> __asm__ __volatile__("ld %0,0(%1)" : "=r"(t) : "b"(&v->counter))
> ;
> else
> __asm__ __volatile__("ld%U1%X1 %0,%1" : "=r"(t) : "m<>"(v->counter));
>
> return t;
> }
>
> The second "asm" above (CONFIG_PPC_KERNEL_PREFIXED is not set). I am
> guessing by searching for "39" in net/core/page_pool.s
>
> This is maybe called from page_pool_unref_netmem()
Thanks! The compiler version helped, I can repro with GCC 14.
It's something special about compound page handling on powerpc64,
AFAICT. I'm guessing that the assembler is mad that we're doing
an unaligned read:
3300 ld 8,39(8) # MEM[(const struct atomic64_t *)_29].counter, t
which does indeed look unaligned to a naked eye. If I replace
virt_to_head_page() with virt_to_page() on line 867 in net/core/page_pool.c
I get:
2982 ld 8,40(10) # MEM[(const struct atomic64_t *)_94].counter, t
and that's what we'd expect. It's reading pp_ref_count which is at
offset 40 in struct net_iov. I'll try to take a closer look at
the compound page handling, with powerpc assembly book in hand,
but perhaps this rings a bell for someone?
next parent reply other threads:[~2024-09-13 15:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20240913125302.0a06b4c7@canb.auug.org.au>
[not found] ` <20240912200543.2d5ff757@kernel.org>
[not found] ` <20240913204138.7cdb762c@canb.auug.org.au>
2024-09-13 15:34 ` Jakub Kicinski [this message]
2024-09-13 15:49 ` linux-next: build failure after merge of the net-next tree Jakub Kicinski
2024-09-13 16:13 ` LEROY Christophe
2024-09-13 16:27 ` Mina Almasry
2024-09-13 18:36 ` Jakub Kicinski
2024-09-13 20:05 ` Mina Almasry
2024-09-13 20:24 ` Jakub Kicinski
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=20240913083426.30aff7f4@kernel.org \
--to=kuba@kernel.org \
--cc=almasrymina@google.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.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).