David Hildenbrand
2020-Jun-05 09:36 UTC
[PATCH RFC v4 00/13] virtio-mem: paravirtualized memory
On 05.06.20 11:08, David Hildenbrand wrote:> On 05.06.20 10:55, Alex Shi wrote: >> >> >> ? 2020/1/9 ??9:48, David Hildenbrand ??: >>> Ping, >>> >>> I'd love to get some feedback on >>> >>> a) The remaining MM bits from MM folks (especially, patch #6 and #8). >>> b) The general virtio infrastructure (esp. uapi in patch #2) from virtio >>> folks. >>> >>> I'm planning to send a proper v1 (!RFC) once I have all necessary MM >>> acks. In the meanwhile, I will do more testing and minor reworks (e.g., >>> fix !CONFIG_NUMA compilation). >> >> >> Hi David, >> >> Thanks for your work! >> >> I am trying your https://github.com/davidhildenbrand/linux.git virtio-mem-v5 >> which works fine for me, but just a 'DMA error' happens when a vm start with >> less than 2GB memory, Do I missed sth? > > Please use the virtio-mem-v4 branch for now, v5 is still under > construction (and might be scrapped completely if v4 goes upstream as is). > > Looks like a DMA issue. Your're hotplugging 1GB, which should not really > eat too much memory. There was a similar issue reported by Hui in [1], > which boiled down to wrong usage of the swiotlb parameter. > > In such cases you should always try to reproduce with hotplug of a > sam-sized DIMM. E.g., hotplugging a 1GB DIMM should result in the same > issue. > > What does your .config specify for CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE? > > I'll try to reproduce with v4 briefly.I guess I know what's happening here. In case we only have DMA memory when booting, we don't reserve swiotlb buffers. Once we hotplug memory and online ZONE_NORMAL, we don't have any swiotlb DMA bounce buffers to map such PFNs (total 0 (slots), used 0 (slots)). Can you try with "swiotlb=force" on the kernel cmdline? -- Thanks, David / dhildenb
David Hildenbrand
2020-Jun-05 10:05 UTC
[PATCH RFC v4 00/13] virtio-mem: paravirtualized memory
On 05.06.20 11:36, David Hildenbrand wrote:> On 05.06.20 11:08, David Hildenbrand wrote: >> On 05.06.20 10:55, Alex Shi wrote: >>> >>> >>> ? 2020/1/9 ??9:48, David Hildenbrand ??: >>>> Ping, >>>> >>>> I'd love to get some feedback on >>>> >>>> a) The remaining MM bits from MM folks (especially, patch #6 and #8). >>>> b) The general virtio infrastructure (esp. uapi in patch #2) from virtio >>>> folks. >>>> >>>> I'm planning to send a proper v1 (!RFC) once I have all necessary MM >>>> acks. In the meanwhile, I will do more testing and minor reworks (e.g., >>>> fix !CONFIG_NUMA compilation). >>> >>> >>> Hi David, >>> >>> Thanks for your work! >>> >>> I am trying your https://github.com/davidhildenbrand/linux.git virtio-mem-v5 >>> which works fine for me, but just a 'DMA error' happens when a vm start with >>> less than 2GB memory, Do I missed sth? >> >> Please use the virtio-mem-v4 branch for now, v5 is still under >> construction (and might be scrapped completely if v4 goes upstream as is). >> >> Looks like a DMA issue. Your're hotplugging 1GB, which should not really >> eat too much memory. There was a similar issue reported by Hui in [1], >> which boiled down to wrong usage of the swiotlb parameter. >> >> In such cases you should always try to reproduce with hotplug of a >> sam-sized DIMM. E.g., hotplugging a 1GB DIMM should result in the same >> issue. >> >> What does your .config specify for CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE? >> >> I'll try to reproduce with v4 briefly. > > I guess I know what's happening here. In case we only have DMA memory > when booting, we don't reserve swiotlb buffers. Once we hotplug memory > and online ZONE_NORMAL, we don't have any swiotlb DMA bounce buffers to > map such PFNs (total 0 (slots), used 0 (slots)). > > Can you try with "swiotlb=force" on the kernel cmdline?Alternative, looks like you can specify "-m 2G,maxmem=16G,slots=1", to create proper ACPI tables that indicate hotpluggable memory. (I'll have to look into QEMU to figure out to always indicate hotpluggable memory that way). -- Thanks, David / dhildenb
? 2020/6/5 ??5:36, David Hildenbrand ??:> I guess I know what's happening here. In case we only have DMA memory > when booting, we don't reserve swiotlb buffers. Once we hotplug memory > and online ZONE_NORMAL, we don't have any swiotlb DMA bounce buffers to > map such PFNs (total 0 (slots), used 0 (slots)). > > Can you try with "swiotlb=force" on the kernel cmdline?Yes, it works fine with this cmdline. problems gone,
? 2020/6/5 ??6:05, David Hildenbrand ??:>> I guess I know what's happening here. In case we only have DMA memory >> when booting, we don't reserve swiotlb buffers. Once we hotplug memory >> and online ZONE_NORMAL, we don't have any swiotlb DMA bounce buffers to >> map such PFNs (total 0 (slots), used 0 (slots)). >> >> Can you try with "swiotlb=force" on the kernel cmdline? > Alternative, looks like you can specify "-m 2G,maxmem=16G,slots=1", to > create proper ACPI tables that indicate hotpluggable memory. (I'll have > to look into QEMU to figure out to always indicate hotpluggable memory > that way). >That works too. Yes, better resolved in qemu, maybe. :) Thanks!
Maybe Matching Threads
- [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory
- [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory
- [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory
- [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory
- [PATCH RFC v4 00/13] virtio-mem: paravirtualized memory