* swiotlb dyn alloc WARNING splat in wireless-next.
@ 2023-10-22 18:48 Ben Greear
2023-10-24 1:01 ` Florian Fainelli
0 siblings, 1 reply; 5+ messages in thread
From: Ben Greear @ 2023-10-22 18:48 UTC (permalink / raw)
To: netdev
Hello,
I saw this in a system with 16GB of RAM running a lot of wifi traffic
on 16 radios. System appears to mostly be working OK, so not sure if it is
a real problem or not.
[76171.488627] WARNING: CPU: 2 PID: 30169 at mm/page_alloc.c:4402 __alloc_pages+0x19c/0x200
[76171.488634] Modules linked in: tls nf_conntrack_netlink nf_conntrack nfnetlink nf_defrag_ipv6 nf_defrag_ipv4 bpfilter vrf 8021q garp mrp stp llc macvlan
pktgen rpcrdma rdma_cm iw_cm ib_cm ib_core qrtr f71882fg intel_rapl_msr iTCO_wdt intel_pmc_bxt ee1004 iTCO_vendor_support snd_hda_codec_hdmi
snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio coretemp intel_rapl_common iwlmvm intel_tcc_cooling x86_pkg_temp_thermal mt7921e intel_powerclamp
mt7921_common mt792x_lib mt76_connac_lib kvm_intel snd_hda_intel mt76 snd_intel_dspcfg snd_hda_codec snd_hda_core mac80211 kvm snd_hwdep iwlwifi snd_seq
irqbypass snd_seq_device pcspkr cfg80211 snd_pcm intel_wmi_thunderbolt i2c_i801 i2c_smbus snd_timer bfq tpm_crb snd soundcore mei_hdcp mei_pxp tpm_tis
tpm_tis_core intel_pch_thermal tpm acpi_pad nfsd auth_rpcgss nfs_acl lockd grace sch_fq_codel sunrpc fuse zram raid1 dm_raid raid456 libcrc32c async_raid6_recov
async_memcpy async_pq async_xor xor async_tx raid6_pq i915 igb i2c_algo_bit drm_buddy intel_gtt drm_display_helper
[76171.488690] drm_kms_helper cec rc_core ttm drm agpgart ixgbe mdio dca xhci_pci hwmon mei_wdt xhci_pci_renesas i2c_core video wmi [last unloaded: nfnetlink]
[76171.488701] CPU: 2 PID: 30169 Comm: kworker/2:2 Not tainted 6.6.0-rc5+ #13
[76171.488704] Hardware name: Default string Default string/SKYBAY, BIOS 5.12 02/21/2023
[76171.488705] Workqueue: events swiotlb_dyn_alloc
[76171.488708] RIP: 0010:__alloc_pages+0x19c/0x200
[76171.488711] Code: ff ff 00 0f 84 56 ff ff ff 80 ce 01 e9 4e ff ff ff 83 fe 0a 0f 86 db fe ff ff 80 3d ba c9 4a 01 00 75 09 c6 05 b1 c9 4a 01 01 <0f> 0b 45 31
e4 e9 4f ff ff ff a9 00 00 08 00 75 43 89 d9 80 e1 7f
[76171.488713] RSP: 0018:ffffc9000babfd78 EFLAGS: 00010246
[76171.488714] RAX: 0000000000000000 RBX: 0000000000000cc4 RCX: 0000000000000000
[76171.488716] RDX: 0000000000000000 RSI: 000000000000000e RDI: 0000000000000cc4
[76171.488717] RBP: 000000000000000e R08: 0000000000000000 R09: 0000000000000000
[76171.488718] R10: ffff88811ff99000 R11: 0000000000000000 R12: ffff888110070400
[76171.488719] R13: 0000000000000000 R14: 0000000003ffffff R15: ffff8881100586b0
[76171.488720] FS: 0000000000000000(0000) GS:ffff88845dc80000(0000) knlGS:0000000000000000
[76171.488722] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[76171.488723] CR2: 0000000003519000 CR3: 0000000002634004 CR4: 00000000003706e0
[76171.488725] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[76171.488726] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[76171.488727] Call Trace:
[76171.488729] <TASK>
[76171.488730] ? __alloc_pages+0x19c/0x200
[76171.488732] ? __warn+0x78/0x130
[76171.488736] ? __alloc_pages+0x19c/0x200
[76171.488738] ? report_bug+0x169/0x1a0
[76171.488742] ? handle_bug+0x41/0x70
[76171.488744] ? exc_invalid_op+0x13/0x60
[76171.488747] ? asm_exc_invalid_op+0x16/0x20
[76171.488751] ? __alloc_pages+0x19c/0x200
[76171.488753] swiotlb_alloc_pool+0x102/0x280
[76171.488756] swiotlb_dyn_alloc+0x2a/0xa0
[76171.488757] process_one_work+0x15d/0x330
[76171.488759] worker_thread+0x2e8/0x400
[76171.488762] ? drain_workqueue+0x120/0x120
[76171.488763] kthread+0xdc/0x110
[76171.488766] ? kthread_complete_and_exit+0x20/0x20
[76171.488769] ret_from_fork+0x28/0x40
[76171.488771] ? kthread_complete_and_exit+0x20/0x20
[76171.488774] ret_from_fork_asm+0x11/0x20
[76171.488778] </TASK>
[76171.488778] ---[ end trace 0000000000000000 ]---
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: swiotlb dyn alloc WARNING splat in wireless-next.
2023-10-22 18:48 swiotlb dyn alloc WARNING splat in wireless-next Ben Greear
@ 2023-10-24 1:01 ` Florian Fainelli
2023-10-24 6:29 ` Christoph Hellwig
2023-10-24 10:44 ` Petr Tesařík
0 siblings, 2 replies; 5+ messages in thread
From: Florian Fainelli @ 2023-10-24 1:01 UTC (permalink / raw)
To: Ben Greear, netdev, Christoph Hellwig, Petr Tesarik
+Christoph, Petr
On 10/22/2023 11:48 AM, Ben Greear wrote:
> Hello,
>
> I saw this in a system with 16GB of RAM running a lot of wifi traffic
> on 16 radios. System appears to mostly be working OK, so not sure if it is
> a real problem or not.
>
> [76171.488627] WARNING: CPU: 2 PID: 30169 at mm/page_alloc.c:4402
> __alloc_pages+0x19c/0x200
> [76171.488634] Modules linked in: tls nf_conntrack_netlink nf_conntrack
> nfnetlink nf_defrag_ipv6 nf_defrag_ipv4 bpfilter vrf 8021q garp mrp stp
> llc macvlan pktgen rpcrdma rdma_cm iw_cm ib_cm ib_core qrtr f71882fg
> intel_rapl_msr iTCO_wdt intel_pmc_bxt ee1004 iTCO_vendor_support
> snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic
> ledtrig_audio coretemp intel_rapl_common iwlmvm intel_tcc_cooling
> x86_pkg_temp_thermal mt7921e intel_powerclamp mt7921_common mt792x_lib
> mt76_connac_lib kvm_intel snd_hda_intel mt76 snd_intel_dspcfg
> snd_hda_codec snd_hda_core mac80211 kvm snd_hwdep iwlwifi snd_seq
> irqbypass snd_seq_device pcspkr cfg80211 snd_pcm intel_wmi_thunderbolt
> i2c_i801 i2c_smbus snd_timer bfq tpm_crb snd soundcore mei_hdcp mei_pxp
> tpm_tis tpm_tis_core intel_pch_thermal tpm acpi_pad nfsd auth_rpcgss
> nfs_acl lockd grace sch_fq_codel sunrpc fuse zram raid1 dm_raid raid456
> libcrc32c async_raid6_recov async_memcpy async_pq async_xor xor async_tx
> raid6_pq i915 igb i2c_algo_bit drm_buddy intel_gtt drm_display_helper
> [76171.488690] drm_kms_helper cec rc_core ttm drm agpgart ixgbe mdio
> dca xhci_pci hwmon mei_wdt xhci_pci_renesas i2c_core video wmi [last
> unloaded: nfnetlink]
> [76171.488701] CPU: 2 PID: 30169 Comm: kworker/2:2 Not tainted
> 6.6.0-rc5+ #13
> [76171.488704] Hardware name: Default string Default string/SKYBAY, BIOS
> 5.12 02/21/2023
> [76171.488705] Workqueue: events swiotlb_dyn_alloc
> [76171.488708] RIP: 0010:__alloc_pages+0x19c/0x200
> [76171.488711] Code: ff ff 00 0f 84 56 ff ff ff 80 ce 01 e9 4e ff ff ff
> 83 fe 0a 0f 86 db fe ff ff 80 3d ba c9 4a 01 00 75 09 c6 05 b1 c9 4a 01
> 01 <0f> 0b 45 31 e4 e9 4f ff ff ff a9 00 00 08 00 75 43 89 d9 80 e1 7f
> [76171.488713] RSP: 0018:ffffc9000babfd78 EFLAGS: 00010246
> [76171.488714] RAX: 0000000000000000 RBX: 0000000000000cc4 RCX:
> 0000000000000000
> [76171.488716] RDX: 0000000000000000 RSI: 000000000000000e RDI:
> 0000000000000cc4
> [76171.488717] RBP: 000000000000000e R08: 0000000000000000 R09:
> 0000000000000000
> [76171.488718] R10: ffff88811ff99000 R11: 0000000000000000 R12:
> ffff888110070400
> [76171.488719] R13: 0000000000000000 R14: 0000000003ffffff R15:
> ffff8881100586b0
> [76171.488720] FS: 0000000000000000(0000) GS:ffff88845dc80000(0000)
> knlGS:0000000000000000
> [76171.488722] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> [76171.488723] CR2: 0000000003519000 CR3: 0000000002634004 CR4:
> 00000000003706e0
> [76171.488725] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
> 0000000000000000
> [76171.488726] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
> 0000000000000400
> [76171.488727] Call Trace:
> [76171.488729] <TASK>
> [76171.488730] ? __alloc_pages+0x19c/0x200
> [76171.488732] ? __warn+0x78/0x130
> [76171.488736] ? __alloc_pages+0x19c/0x200
> [76171.488738] ? report_bug+0x169/0x1a0
> [76171.488742] ? handle_bug+0x41/0x70
> [76171.488744] ? exc_invalid_op+0x13/0x60
> [76171.488747] ? asm_exc_invalid_op+0x16/0x20
> [76171.488751] ? __alloc_pages+0x19c/0x200
> [76171.488753] swiotlb_alloc_pool+0x102/0x280
> [76171.488756] swiotlb_dyn_alloc+0x2a/0xa0
> [76171.488757] process_one_work+0x15d/0x330
> [76171.488759] worker_thread+0x2e8/0x400
> [76171.488762] ? drain_workqueue+0x120/0x120
> [76171.488763] kthread+0xdc/0x110
> [76171.488766] ? kthread_complete_and_exit+0x20/0x20
> [76171.488769] ret_from_fork+0x28/0x40
> [76171.488771] ? kthread_complete_and_exit+0x20/0x20
> [76171.488774] ret_from_fork_asm+0x11/0x20
> [76171.488778] </TASK>
> [76171.488778] ---[ end trace 0000000000000000 ]---
>
> Thanks,
> Ben
>
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: swiotlb dyn alloc WARNING splat in wireless-next.
2023-10-24 1:01 ` Florian Fainelli
@ 2023-10-24 6:29 ` Christoph Hellwig
2023-10-24 8:06 ` Petr Tesařík
2023-10-24 10:44 ` Petr Tesařík
1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2023-10-24 6:29 UTC (permalink / raw)
To: Florian Fainelli; +Cc: Ben Greear, netdev, Christoph Hellwig, Petr Tesarik
Looks like we need to limit the maxium allocation size.
Peter, do you have time to look into this?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: swiotlb dyn alloc WARNING splat in wireless-next.
2023-10-24 6:29 ` Christoph Hellwig
@ 2023-10-24 8:06 ` Petr Tesařík
0 siblings, 0 replies; 5+ messages in thread
From: Petr Tesařík @ 2023-10-24 8:06 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Florian Fainelli, Ben Greear, netdev
On Tue, 24 Oct 2023 08:29:20 +0200
Christoph Hellwig <hch@lst.de> wrote:
> Looks like we need to limit the maxium allocation size.
>
> Peter, do you have time to look into this?
Yes, I'm already looking...
Petr T
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: swiotlb dyn alloc WARNING splat in wireless-next.
2023-10-24 1:01 ` Florian Fainelli
2023-10-24 6:29 ` Christoph Hellwig
@ 2023-10-24 10:44 ` Petr Tesařík
1 sibling, 0 replies; 5+ messages in thread
From: Petr Tesařík @ 2023-10-24 10:44 UTC (permalink / raw)
To: Florian Fainelli; +Cc: Ben Greear, netdev, Christoph Hellwig
Hi Florian,
thank you for your report!
On Mon, 23 Oct 2023 18:01:46 -0700
Florian Fainelli <f.fainelli@gmail.com> wrote:
> +Christoph, Petr
>
> On 10/22/2023 11:48 AM, Ben Greear wrote:
> > Hello,
> >
> > I saw this in a system with 16GB of RAM running a lot of wifi traffic
> > on 16 radios. System appears to mostly be working OK, so not sure if it is
> > a real problem or not.
> >
> > [76171.488627] WARNING: CPU: 2 PID: 30169 at mm/page_alloc.c:4402
> > __alloc_pages+0x19c/0x200
This is a WARN_ON_ONCE_GFP(order > MAX_ORDER, gfp), and the allocation
fails. The dynamic SWIOTLB pool allocator will then reduce the requested
size by half until allocation succeeds (or fails even for minimum size).
That's why your system behaves normally.
However, starting with a request that is larger than MAX_ORDER is
silly, especially since this is the default if you build your kernel
with CONFIG_SWIOTLB_DYNAMIC=y and boot it without any swiotlb=
parameter. It makes sense to clamp the requested size to MAX_ORDER
before the first loop iteration.
I'm going to send a patch.
Petr T
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-24 10:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-22 18:48 swiotlb dyn alloc WARNING splat in wireless-next Ben Greear
2023-10-24 1:01 ` Florian Fainelli
2023-10-24 6:29 ` Christoph Hellwig
2023-10-24 8:06 ` Petr Tesařík
2023-10-24 10:44 ` Petr Tesařík
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).