-
Notifications
You must be signed in to change notification settings - Fork 492
XDMA poor performance and high latency spikes explained and fixed #333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@dmitrym1 I compared the CPU utilization during H2C and C2H operations. During C2H, the kernel cmpl thread and userspace thread utilization were 70% and 30%, respectively. During H2C, they were 80% and 20%, respectively. Compared to C2H, the userspace thread utilization during H2C is 10% lower. I wonder if this is causing the performance difference. How can I improve the H2C speed? |
|
@ynt1988 Thank you for using my work. I agree with your conclusion about CPU usage. Since in poll mode the driver actively polls the Card for completion, having higher CPU utilization by kernel thread (i.e. more time in busy wait) and lower CPU utilization by userspace thread (i.e. less time in copying data) clearly leads to lower H2C speed. Which could mean that either the kernel driver does something extra in H2C transfer, or the transfer itself is slower. You could try to fix the first part using XDMA by @Prandr https://github.com/Prandr/dma_ip_drivers . He has significantly reworked the driver and could have fixed some potential issues. About the second part, make sure your Card completes the transfer as fast as possible. Other possible reason is hardware limitation. |
|
@dmitrym1 Thank you for your reply. I have tried downloading and using @Prandr https://github.com/Prandr/dma_ip_drivers, but I don't see the "/dev/xdma_c2h_" and "/dev/xdma_h2c_" device files. Do I need to regenerate a new Block Design and bitstream for the FPGA? |
|
Hi @dmitrym1, many thanks for your work on XDMA driver. I replied to you the last month in this conversation : At the moment I still have the same issue (high latency spike up to 500 us btw two consecutive read calls), and I ve already tried the @Prandr reworked driver version. However, I encountered the same issue as @ynt1988. Would it be possible to stay in touch with you to further discuss this issue? |
|
@ynt1988 @MauSilvestrini You really try to make a dead horse to win a race with the driver here. |
|
@Prandr You are right, that's exactly the issue I encountered. Thank you for the correction. My apologies, I should have carefully studied the make help output. |
|
@Prandr many thanks for your clarification ! I ll update the default DID in my FW design. I ll keep you updated. |
|
Hi @Prandr, I ve chosen to modify the xdma_mod.c structure (named as pci_ids) by adding my default DID that is 0x8018. fpga_fd = open(devname, O_RDWR); Do I need to perform any additional configuration ? |
|
@MauSilvestrini |
Fixes #332