eideticom / p2pmem-pci Goto Github PK
View Code? Open in Web Editor NEWA (hacky) Linux kernel driver for PCI end points that implement p2pmem on the device.
Home Page: http://www.eideticom.com
A (hacky) Linux kernel driver for PCI end points that implement p2pmem on the device.
Home Page: http://www.eideticom.com
Add this and/or others like it to the merge flow to assist in code quality going forward.
OS: Ubuntu 18.04.4 LTS
Kernel: 4.20.0
I am currently testing a custom device driver with p2pmem-pci userspace driver. My goal is to write a data to device's MMIO register through p2pmem-pci device.
#define _GNU_SOURCE 1
...
int fd = open("/dev/p2pmem0", O_WRONLY | O_DIRECT);
The open()
returns -EINVAL due to O_DIRECT flag. If I remove O_DIRECT, open()
succeeds but write operations do not work as intended (no MMIO write).
Manual of open()
says the filesystem should not have journaling, which requires write buffer, so I also run the program in the journal-disabled ext4 fs, but have no lock.
Could you please let me know what should I do to make O_DIRECT works?
Hi,
I have two NVMe device with CMB.
When I want to use pread() form /dev/nvme0n1 to /dev/p2pmem0, it will stuck.
I trace the code and found it is fail in kernel function pci_p2pdma_map_sg_attrs().
It always report p2pdma map type unknown (PCI_P2PDMA_MAP_UNKNOWN).
Could you help me or give me some comment to fix this issue ?
Thank,
Joshua Lin
OS: Ubuntu 18.04.4 LTS
Kernel: 5.14.10
(re-build kernel and enable CONFIG_PCI_P2PDMA)
When we install p2pmem-pci.ko into a kernel there is a chance it will load before the device driver(s) for the PCIe devices that are publishing p2pdma memory (nvme for example). Therefore we want this module to load as late as possible via a late_initcall().
Hi,
I have no NVMe with CMB, but I have an FPGA that can be configured with a BAR mapped to its internal LPDDR. I tried this repo and exposed the BAR to user space as /dev/p2pmem0. But when I ran the p2pmem-test application, like "./p2pmem-test /dev/nvme0n1 /dev/nvme1n1 /dev/p2pmem0 -c 1 -s 4k --check" .
It ends up with a pwrite I/O error.
From the dmesg I can see the "blk_update_request: I/O error, dev nvme0n1, sector 0 op 0x1:(WRITE) flags 0x8800 phys_seg 1 prio class 0" error message.
So I am curious if we still have the bounce buffer support in p2pmem. Thanks in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.