399 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

[OLK-5.10] x86_64上无法创建/dev/pmem0

已完成
缺陷 成员
创建于  
2022-06-09 12:40

【标题描述】[OLK-5.10] x86_64上无法创建/dev/pmem0
【环境信息】

软件信息:
1) openEuler-22.03-LTS-x86_64.qcow2
2) OLK-5.10
如果有特殊组网,请提供网络拓扑图
【问题复现步骤】
在kernel启动的命令行后添加 memmap=1G!4G,用来创建pmem
出现概率:必现
【预期结果】
可以创建/dev/pmem0节点
【实际结果】
无/dev/pmem0节点
【附件信息】
使用上游的5.10内核可以正常创建/dev/pmem0
输入图片说明

使用OLk-5.10内核没有创建/dev/pmem0
输入图片说明

启动OLK-5.10的dmesg部分日志如下:

[    0.000000] Linux version 5.10.0 (root@localhost.localdomain) (gcc (GCC) 10.3.1, GNU ld (GNU Binutils) 2.37) #2 SMP Thu Jun 9 03:32:50 UTC 2022
[    0.000000] Command line: BOOT_IMAGE=/vmlinuz-5.10.0 root=UUID=ae2cd454-a1aa-4683-8c9d-711a1d610f40 ro console=tty1 console=ttyS0 rootfstype=ext4 nomodeset quiet oops=panic softlockup_panic=1 nmi_watchdog=1 rd.shell=0 selinux=0 crashkernel=256M panic=3 memmap=1G!4G
[    0.000000] x86/fpu: x87 FPU will use FXSAVE
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x00000000bffdbfff] usable
[    0.000000] BIOS-e820: [mem 0x00000000bffdc000-0x00000000bfffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000023fffffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] user-defined physical RAM map:
[    0.000000] user: [mem 0x0000000000000000-0x000000000009fbff] usable
[    0.000000] user: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[    0.000000] user: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] user: [mem 0x0000000000100000-0x00000000bffdbfff] usable
[    0.000000] user: [mem 0x00000000bffdc000-0x00000000bfffffff] reserved
[    0.000000] user: [mem 0x00000000feffc000-0x00000000feffffff] reserved
[    0.000000] user: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[    0.000000] user: [mem 0x0000000100000000-0x000000013fffffff] persistent (type 12)
[    0.000000] user: [mem 0x0000000140000000-0x000000023fffffff] usable
[    0.000000] SMBIOS 2.8 present.
[    0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
[    0.000000] Hypervisor detected: KVM
[    0.000000] kvm-clock: Using msrs 4b564d01 and 4b564d00
[    0.000000] kvm-clock: cpu 0, msr 9ce01001, primary cpu clock
[    0.000000] kvm-clock: using sched offset of 7810486346661 cycles
[    0.000002] clocksource: kvm-clock: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
[    0.000005] tsc: Detected 2499.998 MHz processor
[    0.000878] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000881] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000884] last_pfn = 0x240000 max_arch_pfn = 0x400000000
[    0.000910] MTRR default type: write-back
[    0.000911] MTRR fixed ranges enabled:
[    0.000913]   00000-9FFFF write-back
[    0.000914]   A0000-BFFFF uncachable
[    0.000915]   C0000-FFFFF write-protect
[    0.000915] MTRR variable ranges enabled:
[    0.000917]   0 base 00C0000000 mask FFC0000000 uncachable
[    0.000917]   1 disabled
[    0.000918]   2 disabled
[    0.000918]   3 disabled
[    0.000919]   4 disabled
[    0.000919]   5 disabled
[    0.000920]   6 disabled
[    0.000920]   7 disabled
[    0.000927] x86/PAT: PAT not supported by the CPU.
[    0.000933] x86/PAT: Configuration [0-7]: WB  WT  UC- UC  WB  WT  UC- UC  
[    0.000935] last_pfn = 0xbffdc max_arch_pfn = 0x400000000
[    0.009005] found SMP MP-table at [mem 0x000f5a50-0x000f5a5f]
[    0.009090] kexec: Reserving the low 1M of memory for crashkernel
[    0.009299] RAMDISK: [mem 0x2fd9e000-0x33ec6fff]
[    0.009301] ACPI: Early table checksum verification disabled
[    0.009305] ACPI: RSDP 0x00000000000F5A10 000014 (v00 BOCHS )
[    0.009309] ACPI: RSDT 0x00000000BFFE13CB 000030 (v01 BOCHS  BXPCRSDT 00000001 BXPC 00000001)
[    0.009315] ACPI: FACP 0x00000000BFFE126F 000074 (v01 BOCHS  BXPCFACP 00000001 BXPC 00000001)
[    0.009324] ACPI: DSDT 0x00000000BFFDFC40 00162F (v01 BOCHS  BXPCDSDT 00000001 BXPC 00000001)
[    0.009327] ACPI: FACS 0x00000000BFFDFC00 000040
[    0.009330] ACPI: APIC 0x00000000BFFE12E3 0000B0 (v01 BOCHS  BXPCAPIC 00000001 BXPC 00000001)
[    0.009334] ACPI: HPET 0x00000000BFFE1393 000038 (v01 BOCHS  BXPCHPET 00000001 BXPC 00000001)
[    0.009337] ACPI: Reserving FACP table memory at [mem 0xbffe126f-0xbffe12e2]
[    0.009338] ACPI: Reserving DSDT table memory at [mem 0xbffdfc40-0xbffe126e]
[    0.009338] ACPI: Reserving FACS table memory at [mem 0xbffdfc00-0xbffdfc3f]
[    0.009339] ACPI: Reserving APIC table memory at [mem 0xbffe12e3-0xbffe1392]
[    0.009340] ACPI: Reserving HPET table memory at [mem 0xbffe1393-0xbffe13ca]
[    0.009355] ACPI: Local APIC address 0xfee00000
[    0.009596] No NUMA configuration found
[    0.009598] Faking a node at [mem 0x0000000000000000-0x000000023fffffff]
[    0.009612] NODE_DATA(0) allocated [mem 0x23ffd3000-0x23fffcfff]
[    0.009885] Reserving 256MB of memory at 2800MB for crashkernel (System RAM: 7167MB)
[    0.009900] Zone ranges:
[    0.009901]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.009903]   DMA32    [mem 0x0000000001000000-0x00000000ffffffff]
[    0.009904]   Normal   [mem 0x0000000100000000-0x000000023fffffff]
[    0.009905]   Device   empty
[    0.009906] Movable zone start for each node
[    0.009908] Early memory node ranges
[    0.009909]   node   0: [mem 0x0000000000001000-0x000000000009efff]
[    0.009910]   node   0: [mem 0x0000000000100000-0x00000000bffdbfff]
[    0.009910]   node   0: [mem 0x0000000140000000-0x000000023fffffff]
[    0.009912] Initmem setup node 0 [mem 0x0000000000001000-0x000000023fffffff]
[    0.009913] On node 0 totalpages: 1834874
[    0.009914]   DMA zone: 64 pages used for memmap
[    0.009914]   DMA zone: 158 pages reserved
[    0.009915]   DMA zone: 3998 pages, LIFO batch:0
[    0.009916]   DMA32 zone: 12224 pages used for memmap
[    0.009917]   DMA32 zone: 782300 pages, LIFO batch:63
[    0.009917]   Normal zone: 16384 pages used for memmap
[    0.009918]   Normal zone: 1048576 pages, LIFO batch:63
[    0.009924] On node 0, zone DMA: 1 pages in unavailable ranges
[    0.009965] On node 0, zone DMA: 97 pages in unavailable ranges
[    0.018595] On node 0, zone Normal: 36 pages in unavailable ranges
[    0.018859] ACPI: PM-Timer IO Port: 0x608
[    0.018862] ACPI: Local APIC address 0xfee00000
[    0.018872] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[    0.018897] IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
[    0.018900] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.018902] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[    0.018902] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.018904] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[    0.018904] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[    0.018906] ACPI: IRQ0 used by override.
[    0.018907] ACPI: IRQ5 used by override.
[    0.018907] ACPI: IRQ9 used by override.
[    0.018908] ACPI: IRQ10 used by override.
[    0.018909] ACPI: IRQ11 used by override.
[    0.018911] Using ACPI (MADT) for SMP configuration information
[    0.018912] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.018917] smpboot: Allowing 8 CPUs, 0 hotplug CPUs
[    0.018935] PM: hibernation: Registered nosave memory: [mem 0x00000000-0x00000fff]
[    0.018936] PM: hibernation: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[    0.018937] PM: hibernation: Registered nosave memory: [mem 0x000a0000-0x000effff]
[    0.018938] PM: hibernation: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[    0.018939] PM: hibernation: Registered nosave memory: [mem 0xbffdc000-0xbfffffff]
[    0.018939] PM: hibernation: Registered nosave memory: [mem 0xc0000000-0xfeffbfff]
[    0.018941] PM: hibernation: Registered nosave memory: [mem 0xfeffc000-0xfeffffff]
[    0.018941] PM: hibernation: Registered nosave memory: [mem 0xff000000-0xfffbffff]
[    0.018942] PM: hibernation: Registered nosave memory: [mem 0xfffc0000-0xffffffff]
[    0.018942] PM: hibernation: Registered nosave memory: [mem 0x100000000-0x13fffffff]
[    0.018944] [mem 0xc0000000-0xfeffbfff] available for PCI devices
[    0.018945] Booting paravirtualized kernel on KVM
[    0.018947] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[    0.022822] setup_percpu: NR_CPUS:8192 nr_cpumask_bits:8 nr_cpu_ids:8 nr_node_ids:1
[    0.023573] percpu: Embedded 65 pages/cpu s229376 r8192 d28672 u524288
[    0.023577] pcpu-alloc: s229376 r8192 d28672 u524288 alloc=1*2097152
[    0.023589] pcpu-alloc: [0] 0 1 2 3 [0] 4 5 6 7 
[    0.023612] kvm-guest: stealtime: cpu 0, msr 238a37080
[    0.023614] kvm-guest: PV spinlocks disabled, no host support
[    0.023616] Fallback order for Node 0: 0 
[    0.023619] Built 1 zonelists, mobility grouping on.  Total pages: 1806044
[    0.023620] Policy zone: Normal
[    0.023621] Kernel command line: BOOT_IMAGE=/vmlinuz-5.10.0 root=UUID=ae2cd454-a1aa-4683-8c9d-711a1d610f40 ro console=tty1 console=ttyS0 rootfstype=ext4 nomodeset quiet oops=panic softlockup_panic=1 nmi_watchdog=1 rd.shell=0 selinux=0 crashkernel=256M panic=3 memmap=1G!4G
[    0.023674] You have booted with nomodeset. This means your GPU drivers are DISABLED
[    0.023674] Any video related functionality will be severely degraded, and you may not even be able to suspend the system properly
[    0.023675] Unless you actually understand what nomodeset does, you should reboot without enabling it
[    0.024884] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.025450] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.025571] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.044061] Memory: 2839956K/7339496K available (14345K kernel code, 5850K rwdata, 4636K rodata, 2460K init, 5660K bss, 565724K reserved, 0K cma-reserved)
[    0.044106] random: get_random_u64 called from cache_random_seq_create+0x85/0x170 with crng_init=0
[    0.044166] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.044176] Kernel/User page tables isolation: enabled
[    0.044194] ftrace: allocating 43657 entries in 171 pages
[    0.058397] ftrace: allocated 171 pages with 5 groups
[    0.058508] rcu: Hierarchical RCU implementation.
[    0.058509] rcu: 	RCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=8.
[    0.058510] 	Rude variant of Tasks RCU enabled.
[    0.058511] 	Tracing variant of Tasks RCU enabled.
[    0.058512] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
[    0.058513] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=8
[    0.060506] NR_IRQS: 524544, nr_irqs: 488, preallocated irqs: 16
[    0.069896] Console: colour VGA+ 80x25
[    0.069909] printk: console [tty1] enabled
[    0.069949] printk: console [ttyS0] enabled
[    0.069969] ACPI: Core revision 20200925
[    0.070105] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604467 ns
[    0.070184] APIC: Switch to symmetric I/O mode setup
[    0.070343] x2apic enabled
[    0.070522] Switched APIC routing to physical x2apic.
[    0.071297] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.071318] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x240937b9988, max_idle_ns: 440795218083 ns
[    0.071322] Calibrating delay loop (skipped) preset value.. 4999.99 BogoMIPS (lpj=2499998)
[    0.071325] pid_max: default: 32768 minimum: 301
[    0.071358] LSM: Security Framework initializing
[    0.071370] Yama: becoming mindful.
[    0.071388] AppArmor: AppArmor initialized

评论 (3)

苟浩 创建了缺陷

Hi gouhao2022, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers: @YangYingliang , @pi3orama , @成坚 (CHENG Jian) , @jiaoff , @zhengzengkai , @Qiuuuuu , @刘勇强 , @Xie XiuQi

openeuler-ci-bot 添加了
 
sig/Kernel
标签
苟浩 修改了描述

已经定位到不生成/dev/pmemX的原因
1)因为将
"rename from arch/x86/kernel/pmem.c
rename to drivers/nvdimm/pmem_legacy_device.c"
2)因为nvdimm编译是模块m,CONFIG_PMEM_LEGACY_DEVICE配置成y,drivers/nvdimm/pmem_legacy_device.c这个文件也不会编译到vmlinux中

现在需要讨论修改方案:
1)如果将nvdimm配置成y,改动是否影响习惯性的使用
2)arm64支持pmem的第一次修改放入架构下,后来回退了,回退原因是"add memmap interface to reserved memory for mremap syscall usage",能贴一下冲突吗?

@jiangfeilong 您好,请问这个问题后续进展如何,麻烦更新最新信息到此,谢谢。

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(4)
5329419 openeuler ci bot 1632792936 9250373 gou hao 2021 1623390923
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助

53164aa7 5694891 3bd8fe86 5694891