Open liampwll opened 3 months ago
On a Pi 4 a consistent benchmark result of 8100k with 3 steppers active is achievable, making this faster than any MCU on the list.
Nice! Any more stats, before/after?
Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html
There are some steps that you can take now:
Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available.
Best regards, ~ Your friendly GitIssueBot
PS: I'm just an automated script, not a human being.
Thanks. Seems interesting. I have some high-level feedback:
lib/
directory (and a note added to lib/README
).src/linux/
directory (with an option of some kind in Kconfig enabling it)? It would seem beneficial to avoid duplicating the code in src/linux/
.Cheers, -Kevin
Is there a reason why the mcu/host "console" message system was changed? Is there something not working well with the existing "pipe" system?
Most of the time it will work fine, however Linux may sometimes decide that a read needs to be a full syscall rather than happening in userspace, which can introduce a large amount of jitter (other syscalls present the same issue, which is why this only does GPIO).
On the other issues: I don't have too much time to work on this right now, but someone else is welcome to take over and get this in a state where it can be merged.
Most of the time it will work fine, however Linux may sometimes decide that a read needs to be a full syscall rather than happening in userspace, which can introduce a large amount of jitter
Interesting. It sounds like it could benefit all "Linux mcu" instances.
-Kevin
This PR adds initial support for using memory-mapped IO on Raspberry Pi SBCs rather than relying on syscalls, as well as cntvct_el0 as a timer source and CPU pinning. On a Pi 4 a consistent benchmark result of 8100k with 3 steppers active is achievable, making this faster than any MCU on the list.
To achieve this result, isolcpus on an upstream kernel must be used as the Raspberry Pi kernel delivers some interrupts to isolated cores. Below are instructions to get this working on a Pi 4 running OpenSUSE Tumbleweed (https://en.opensuse.org/HCL:Raspberry_Pi4):
systemctl disable irqbalance
yast2
, navigate toboot loader > kernel parameters
, and append the following:nohz=on nohz_full=3 rcu_nocbs=3 isolcpus=nohz,domain,managed_irq,3 rcu_nocb_poll iomem=relaxed
/boot/efi/extraconfig.txt
:zypper up
and rebootecho -1 > /proc/sys/kernel/sched_rt_runtime_us
/root/klipper
, run the following commands to set up Klipper: