Author Topic: Linux vs RT-Smart vs NuttX on the same Allwinner D1 RISC-V board  (Read 956 times)

0 Members and 2 Guests are viewing this topic.

Offline lanceharvieTopic starter

  • Newbie
  • Posts: 3
  • Country: au
    • RunTime
I recently ran a comparison of Linux, RT-Thread RT-Smart and Apache NuttX on the same Sipeed Lichee RV / 86 Panel using the Allwinner D1 / XuanTie C906 RISC-V processor.

The idea was simple: keep the hardware constant and see what really changes when the OS architecture changes.

What I expected to be a benchmark exercise turned into quite a bit of board-level debugging.

A few of the more interesting findings:

* RT-Smart needed BSP work before I could get a stable userspace environment.
* NuttX initially booted successfully, then reset because U-Boot had left the D1 watchdog running.
* OpenSBI accepted the TIME request, but the expected supervisor timer interrupt never arrived on the tested firmware path.
* I moved NuttX to the native Allwinner Timer1 peripheral.
* Programming 24,000 for a 1 ms tick actually produced a 24,001-clock period. The correct value was 23,999.
* That one-count error was only about 41.7 ppm, but over roughly 20 seconds it accumulated to almost 0.84 ms and invalidated the original latency measurements.

After correcting the timer and measurement methodology, the loaded NuttX 1 ms periodic test measured:

p50: 0.542 us
p99: 0.583 us
max: 0.708 us
missed periods: 0 / 20,000

The important caveat is that the NuttX configuration was FLAT S-mode with a shared address space. Linux was providing protected processes and a much richer execution environment, while RT-Smart provided MMU-backed userspace and process isolation.

So I don't think the useful conclusion is simply "NuttX is faster than Linux."

The more interesting result is how much the protection model, scheduler, timer implementation, inherited bootloader state and measurement code affect what a benchmark number actually means.

I documented the complete experiment, including the failed tests and methodology.

GitHub:
https://github.com/lanceharvie/allwinner-d1-os-benchmark

30-page technical report:
https://doi.org/10.5281/zenodo.22054539

Video:
https://youtu.be/0gDMiJOwFoE

I also continued with the board afterwards and now have the 720×720 LCD, touch, XR829 Wi-Fi and a native RunTime touchscreen GUI running on the same hardware.

GUI demo:
https://youtu.be/ES-3FGEeBE4

I'm interested in what people here would test next on the same platform.

PREEMPT_RT Linux is the obvious next one for me, but I’d also be interested in other benchmark ideas that would make the comparison more useful.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->