Re: [PATCH v1 1/2] vdso: Add VDSO_UNALIGNED_PACKED config option for ARMv5
From: Marc Kleine-Budde
Date: Wed Oct 21 2026 - 02:45:43 EST
On 20.10.2026 17:54:55, Arnd Bergmann wrote:
> > When booted via NFS-root to the login prompt, we have about 570k System
> > alignment fixups, all in the IP stack: :/
> >
> > __udp4_lib_rcv+0x78/0xc6c
> > icmpv6_echo_reply+0x160/0x504
> > ip_send_unicast_reply+0xf0/0x3f8
> > ndisc_send_skb+0x15c/0x40c
> > rawv6_recvmsg+0x114/0x3b4
> > tcp_rcv_established+0x3ec/0xba0
> > tcp_v4_fill_cb+0x70/0xec
> > tcp_validate_incoming+0x540/0x868
>
> That is usually a bug in the ethernet driver, which should take care of
> aligning the IP header in the rx skb. Many drivers do this using
> netdev_alloc_skb_ip_align(), but I see that fec has its own buffer
> management, so it may not be that easy to address here but would
> boost performance quite a bit if you do.
Thanks for the pointer - different topic though.
> > Comparing v7.0.12 with mainline "unaligned.h" and reverting commit
> > a339671db64b ("vdso: Switch get/put_unaligned() from packed struct to
> > memcpy()") brings no difference with respect to alignment problems. But
> > I see the increase in I/O performance (measured with "fio" [1]) on a
> > UBIFS/NAND file system:
^^^^^^^^^^
> >
> > - v7.0.12 NFS root
> > User: 0
> > System: 573956 (tcp_measure_rcv_mss+0xe4/0x1e0)
> > Skipped: 0
> > Half: 4
> > Word: 573940
> > DWord: 0
> > Multi: 34
> > User faults: 0 (ignored)
> >
> > WRITE: bw=272KiB/s (278kB/s), 272KiB/s-272KiB/s (278kB/s-278kB/s),
> > io=32.0MiB (33.6MB), run=120532-120532msec
> >
> > - v7.0.12 NFS root, reverted
> > User: 0
> > System: 574214 (tcp_measure_rcv_mss+0xe4/0x1e0)
> > Skipped: 0
> > Half: 4
> > Word: 574183
> > DWord: 0
> > Multi: 27
> > User faults: 0 (ignored)
> >
> > WRITE: bw=343KiB/s (352kB/s), 343KiB/s-343KiB/s (352kB/s-352kB/s),
> > io=32.0MiB (33.6MB), run=95439-95439msec
>
> Ok, so about the same improvement that you saw on ubifs.
That test actually was running on the same UBIFS on NAND file system as
Stefan's original test. Although I bootet the system by NFS root.
> > Booting from UBIFS, so only the lab background IP noise...
> >
> > - v7.0.12 UBIFS/NAND root, reverted
> > User: 0
> > System: 164 (rawv6_recvmsg+0x114/0x3b4)
> > Skipped: 0
> > Half: 0
> > Word: 127
> > DWord: 0
> > Multi: 37
> > User faults: 0 (ignored)
>
> At least it seems fairly safe to assume that your original
> finding is correct and my worry about adding more faults is
> unfounded.
Yes.
regards,
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Attachment:
signature.asc
Description: PGP signature