Re: [RFC PATCH 00/20] Introduce the famfs shared-memory file system
On 24/05/23 03:57PM, Miklos Szeredi wrote: > [trimming CC list] > > On Thu, 23 May 2024 at 04:49, John Groves wrote: > > > - memmap=! will reserve a pretend pmem device at > > > > - memmap=$ will reserve a pretend dax device at > > > > Doesn't get me a /dev/dax or /dev/pmem > > Complete qemu command line: > > qemu-kvm -s -serial none -parallel none -kernel > /home/mszeredi/git/linux/arch/x86/boot/bzImage -drive > format=raw,file=/home/mszeredi/root_fs,index=0,if=virtio -drive > format=raw,file=/home/mszeredi/images/ubd1,index=1,if=virtio -chardev > stdio,id=virtiocon0,signal=off -device virtio-serial -device > virtconsole,chardev=virtiocon0 -cpu host -m 8G -net user -net > nic,model=virtio -fsdev local,security_model=none,id=fsdev0,path=/home > -device virtio-9p-pci,fsdev=fsdev0,mount_tag=hostshare -device > virtio-rng-pci -smp 4 -append 'root=/dev/vda console=hvc0 > memmap=4G$4G' > > root@kvm:~/famfs# scripts/chk_efi.sh > This system is neither Ubuntu nor Fedora. It is identified as debian. > /sys/firmware/efi not found; probably not efi > not found; probably nof efi > /boot/efi/EFI not found; probably not efi > /boot/efi/EFI/BOOT not found; probably not efi > /boot/efi/EFI/ not found; probably not efi > /boot/efi/EFI//grub.cfg not found; probably nof efi > Probably not efi; errs=6 > > Thanks, > Miklos I'm baffled as to why the memmap thing is not working for you. I don't see anything amiss in your config file, but the actual plumbing of that kernel option isn't anything I've worked on. Out of curiosity, are you running on x86? Have you tried the 's/$/!/' method with memmap? That should give you a pmem device instead, which you will see with 'ndctl list', and can convert to devdax with ndctl (recipe above in this thread). Note that 4GiB is the minimum size that famfs supports. A quick status on where I am with famfs: I've made progress on my substantial learning curve with fuse, and have come up with a strategy for the famfs fuse daemon to access metadata in a way that leverages the current famfs user space without excessive re-writing (which is encouraging). I haven't started test-hacking dax_iomap_* enabled files into the fuse kmod yet; initial RFCs in that area are probably a few weeks out, but definitely coming - undoubtedly with a lot of questions. Regards, John
Re: [RFC PATCH 00/20] Introduce the famfs shared-memory file system
On Fri, May 24, 2024 at 09:55:48AM +0200, Miklos Szeredi wrote: > On Fri, 24 May 2024 at 02:47, John Groves wrote: > > > Apologies, but I'm short on time at the moment - going into a long holiday > > weekend in the US with family plans. I should be focused again by middle of > > next week. > > NP. > > Obviously I'll need to test it before anything is merged, other than > that this is not urgent at all... > > > But can you check /proc/cmdline to see of the memmap arg got through without > > getting mangled? The '$' tends to get fubar'd. You might need \$, or I've > > seen > > the need for \\\$. If it's un-mangled, there should be a dax device. > > /proc/cmdline shows the option correctly: > > root@kvm:~# cat /proc/cmdline > root=/dev/vda console=hvc0 memmap=4G$4G > > > If that doesn't work, it's worth trying '!' instead, which I think would > > give > > you a pmem device - if the arg gets through (but ! is less likely to get > > horked). That pmem device can be converted to devdax... > > That doesn't work either. No device created in /dev (dax or pmem). I think you need to do some ndctl magic to get the memory to be namespaced correctly for the correct devices to appear. https://docs.pmem.io/ndctl-user-guide/managing-namespaces IIRC, need to set the type to pmem and the mode to fsdax, devdax or raw to get the relevant device nodes to be created for the range.. Cheers, Dave. -- Dave Chinner da...@fromorbit.com
Re: [RFC PATCH 00/20] Introduce the famfs shared-memory file system
On Fri, 24 May 2024 at 02:47, John Groves wrote: > Apologies, but I'm short on time at the moment - going into a long holiday > weekend in the US with family plans. I should be focused again by middle of > next week. NP. Obviously I'll need to test it before anything is merged, other than that this is not urgent at all... > But can you check /proc/cmdline to see of the memmap arg got through without > getting mangled? The '$' tends to get fubar'd. You might need \$, or I've seen > the need for \\\$. If it's un-mangled, there should be a dax device. /proc/cmdline shows the option correctly: root@kvm:~# cat /proc/cmdline root=/dev/vda console=hvc0 memmap=4G$4G > If that doesn't work, it's worth trying '!' instead, which I think would give > you a pmem device - if the arg gets through (but ! is less likely to get > horked). That pmem device can be converted to devdax... That doesn't work either. No device created in /dev (dax or pmem). free(1) does show that the reserved memory is gone in both cases, so something does happen. Attaching my .config as well. Thanks, Miklos .config Description: Binary data
Re: [RFC PATCH 00/20] Introduce the famfs shared-memory file system
On 24/05/23 03:57PM, Miklos Szeredi wrote: > [trimming CC list] > > On Thu, 23 May 2024 at 04:49, John Groves wrote: > > > - memmap=! will reserve a pretend pmem device at > > > > - memmap=$ will reserve a pretend dax device at > > > > Doesn't get me a /dev/dax or /dev/pmem > > Complete qemu command line: > > qemu-kvm -s -serial none -parallel none -kernel > /home/mszeredi/git/linux/arch/x86/boot/bzImage -drive > format=raw,file=/home/mszeredi/root_fs,index=0,if=virtio -drive > format=raw,file=/home/mszeredi/images/ubd1,index=1,if=virtio -chardev > stdio,id=virtiocon0,signal=off -device virtio-serial -device > virtconsole,chardev=virtiocon0 -cpu host -m 8G -net user -net > nic,model=virtio -fsdev local,security_model=none,id=fsdev0,path=/home > -device virtio-9p-pci,fsdev=fsdev0,mount_tag=hostshare -device > virtio-rng-pci -smp 4 -append 'root=/dev/vda console=hvc0 > memmap=4G$4G' > > root@kvm:~/famfs# scripts/chk_efi.sh > This system is neither Ubuntu nor Fedora. It is identified as debian. > /sys/firmware/efi not found; probably not efi > not found; probably nof efi > /boot/efi/EFI not found; probably not efi > /boot/efi/EFI/BOOT not found; probably not efi > /boot/efi/EFI/ not found; probably not efi > /boot/efi/EFI//grub.cfg not found; probably nof efi > Probably not efi; errs=6 > > Thanks, > Miklos Apologies, but I'm short on time at the moment - going into a long holiday weekend in the US with family plans. I should be focused again by middle of next week. But can you check /proc/cmdline to see of the memmap arg got through without getting mangled? The '$' tends to get fubar'd. You might need \$, or I've seen the need for \\\$. If it's un-mangled, there should be a dax device. If that doesn't work, it's worth trying '!' instead, which I think would give you a pmem device - if the arg gets through (but ! is less likely to get horked). That pmem device can be converted to devdax... Regards, John
Re: [RFC PATCH 00/20] Introduce the famfs shared-memory file system
[trimming CC list] On Thu, 23 May 2024 at 04:49, John Groves wrote: > - memmap=! will reserve a pretend pmem device at > > - memmap=$ will reserve a pretend dax device at Doesn't get me a /dev/dax or /dev/pmem Complete qemu command line: qemu-kvm -s -serial none -parallel none -kernel /home/mszeredi/git/linux/arch/x86/boot/bzImage -drive format=raw,file=/home/mszeredi/root_fs,index=0,if=virtio -drive format=raw,file=/home/mszeredi/images/ubd1,index=1,if=virtio -chardev stdio,id=virtiocon0,signal=off -device virtio-serial -device virtconsole,chardev=virtiocon0 -cpu host -m 8G -net user -net nic,model=virtio -fsdev local,security_model=none,id=fsdev0,path=/home -device virtio-9p-pci,fsdev=fsdev0,mount_tag=hostshare -device virtio-rng-pci -smp 4 -append 'root=/dev/vda console=hvc0 memmap=4G$4G' root@kvm:~/famfs# scripts/chk_efi.sh This system is neither Ubuntu nor Fedora. It is identified as debian. /sys/firmware/efi not found; probably not efi not found; probably nof efi /boot/efi/EFI not found; probably not efi /boot/efi/EFI/BOOT not found; probably not efi /boot/efi/EFI/ not found; probably not efi /boot/efi/EFI//grub.cfg not found; probably nof efi Probably not efi; errs=6 Thanks, Miklos