linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [EXTERNAL] [swiotlb] 44d89f2248: Kernel_panic-not_syncing:swiotlb_init_remap:nslabs=#too_small
       [not found] <Ys43FtIumAsHPn+y@xsang-OptiPlex-9020>
@ 2022-07-13  5:58 ` Tianyu Lan
  2022-07-13  6:02   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Tianyu Lan @ 2022-07-13  5:58 UTC (permalink / raw)
  To: kernel test robot, Tianyu Lan, Christoph Hellwig
  Cc: linux-doc, iommu, lkp, lkp

On 7/13/2022 11:08 AM, kernel test robot wrote:
> [You don't often get email from oliver.sang@intel.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> Greeting,
> 
> FYI, we noticed the following commit (built with gcc-11):
> 
> commit: 44d89f22489c65400dbf9ed9ad1d18d2ea064b89 ("swiotlb: split up the global swiotlb lock")
> git://git.infradead.org/users/hch/misc.git swiotlb-cleanup
> 
> in testcase: boot
> 
> on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
> 
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
> 
> 
> +---------------------------------------------------------------+------------+------------+
> |                                                               | 4136ce90f0 | 44d89f2248 |
> +---------------------------------------------------------------+------------+------------+
> | boot_successes                                                | 23         | 0          |
> | boot_failures                                                 | 0          | 18         |
> | Kernel_panic-not_syncing:swiotlb_init_remap:nslabs=#too_small | 0          | 18         |
> +---------------------------------------------------------------+------------+------------+
> 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kernel test robot <oliver.sang@intel.com>
> 
> 
> [   30.005215][    T0] Unknown kernel command line parameters "RESULT_ROOT=/result/boot/1/vm-snb/debian-11.1-x86_64-20220510.cgz/x86_64-rhel-8.3-kunit/gcc-11/44d89f22489c65400dbf9ed9ad1d18d2ea064b89/3 BOOT_IMAGE=/pkg/linux/x86_64-rhel-8.3-kunit/gcc-11/44d89f22489c65400dbf9ed9ad1d18d2ea064b89/vmlinuz-5.19.0-rc3-00015-g44d89f22489c branch=hch-misc/swiotlb-cleanup job=/lkp/jobs/scheduled/vm-snb-102/boot-1-debian-11.1-x86_64-20220510.cgz-44d89f22489c65400dbf9ed9ad1d18d2ea064b89-20220713-11587-2q30ty-2.yaml user=lkp ARCH=x86_64 kconfig=x86_64-rhel-8.3-kunit commit=44d89f22489c65400dbf9ed9ad1d18d2ea064b89 vmalloc=256M max_uptime=600 LKP_SERVER=internal-lkp-server selinux=0 softlockup_panic=1 prompt_ramdisk=0 vga=normal", will be passed to user space.
> [   30.015899][    T0] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes, linear)
> [   30.019270][    T0] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
> [   30.020042][    T0] mem auto-init: stack:off, heap alloc:off, heap free:off
> [   30.020607][    T0] Stack Depot early init allocating hash table with memblock_alloc, 8388608 bytes
> [   30.023950][    T0] Kernel panic - not syncing: swiotlb_init_remap: nslabs = 0 too small
> [   30.024616][    T0] CPU: 0 PID: 0 Comm: swapper Not tainted 5.19.0-rc3-00015-g44d89f22489c #1
> [   30.025310][    T0] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
> [   30.026141][    T0] Call Trace:
> [   30.026399][    T0]  <TASK>
> [ 30.026630][ T0] dump_stack_lvl (kbuild/src/consumer/lib/dump_stack.c:107 (discriminator 1))
> [ 30.026992][ T0] panic (kbuild/src/consumer/kernel/panic.c:292)
> [ 30.027301][ T0] ? panic_print_sys_info+0x60/0x60
> [ 30.027770][ T0] ? vclkdev_alloc (kbuild/src/consumer/drivers/iommu/intel/dmar.c:878)
> [   30.028152][    T0]  ? is_uv_system+0x5/0x40
> [   30.028503][    T0]  ? up_write+0x48/0x80
> [   30.028833][    T0]  swiotlb_init_remap+0x36/0x37
> [   30.029221][    T0]  mem_init+0xe/0x13c
> [   30.029538][    T0]  mm_init+0x63/0x81
> [   30.029848][    T0]  start_kernel+0x143/0x39e
> [   30.030206][    T0]  secondary_startup_64_no_verify+0xe0/0xeb
> [   30.030680][    T0]  </TASK>
> 
> 

Thanks for report. The issue is caused by auto merging between
commit44d89f("swiotlb: split up the global swiotlb lock") and commit 
0bf28fc40(swiotlb: panic if nslabs is too small). nslab is checked 
before initialization.

Christoph, do you prefer to update patch "swiotlb: split up the global 
swiotlb lock" or append a fix patch on current brand?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [EXTERNAL] [swiotlb] 44d89f2248: Kernel_panic-not_syncing:swiotlb_init_remap:nslabs=#too_small
  2022-07-13  5:58 ` [EXTERNAL] [swiotlb] 44d89f2248: Kernel_panic-not_syncing:swiotlb_init_remap:nslabs=#too_small Tianyu Lan
@ 2022-07-13  6:02   ` Christoph Hellwig
  2022-07-13 16:11     ` Conor Dooley
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2022-07-13  6:02 UTC (permalink / raw)
  To: Tianyu Lan
  Cc: kernel test robot, Tianyu Lan, Christoph Hellwig, linux-doc,
	iommu, lkp, lkp

On Wed, Jul 13, 2022 at 01:58:38PM +0800, Tianyu Lan wrote:
> Thanks for report. The issue is caused by auto merging between
> commit44d89f("swiotlb: split up the global swiotlb lock") and commit 
> 0bf28fc40(swiotlb: panic if nslabs is too small). nslab is checked before 
> initialization.
>
> Christoph, do you prefer to update patch "swiotlb: split up the global 
> swiotlb lock" or append a fix patch on current brand?

Please just send a patch againt the current tree.  I'll see if squashing
it in makes any sense.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [EXTERNAL] [swiotlb] 44d89f2248: Kernel_panic-not_syncing:swiotlb_init_remap:nslabs=#too_small
  2022-07-13  6:02   ` Christoph Hellwig
@ 2022-07-13 16:11     ` Conor Dooley
  0 siblings, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2022-07-13 16:11 UTC (permalink / raw)
  To: hch; +Cc: Tianyu.Lan, iommu, linux-doc, lkp, lkp, ltykernel, oliver.sang

FWIW, I hit this on a PolarFire SoC.
Was relieved to see that it was not another wacky edge case like my
last run-in with swiotlb issues! If you could CC me on the fix that'd
be great.

Thanks,
Conor.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-13 16:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Ys43FtIumAsHPn+y@xsang-OptiPlex-9020>
2022-07-13  5:58 ` [EXTERNAL] [swiotlb] 44d89f2248: Kernel_panic-not_syncing:swiotlb_init_remap:nslabs=#too_small Tianyu Lan
2022-07-13  6:02   ` Christoph Hellwig
2022-07-13 16:11     ` Conor Dooley

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).