10–12 Dec 2013
DESY
Europe/Berlin timezone

Considerations for the real-time performance issues in linux/MicroTCA

12 Dec 2013, 17:15
13m
DESY Lecture Hall (DESY)

DESY Lecture Hall

DESY

Notkestraße 85 22607 Hamburg
Software for MTCA.4 Software for MTCA.4

Speaker

Dr Kukhee Kim (SLAC National Accelerator Laboratory)

Description

The MicroTCA platform has been selected for usage as the base platform for SLAC control systems for future designs and upgrades - along with embedded linux as the software platform. We have evaluated the microTCA and linux platform for usage in our timing, low-level RF, and BPM systems. We have found that the new platform brings challenges in interrupt handling, and scatter DMA. Despite migration of much of the hard real-time functionality to the FPGA firmware level, the interrupt handling and its real-time performance are important factors for our control system as the software layer needs to deterministically process time critical functions driven by each interrupt. Linux has a long processing chain for the interrupt from the kernel to user space driver, and it also provides various methods of providing the interrupt notice to the user driver: signal and ioctl() with device file. Each method provides different performance. We are going to describe our experience for interrupt handling with regard to real-time performance. In some cases DMA is also needed for applications which use fast digitizers. We have used traditional DMA for the real-time world previously, because most real-time OS(s) are based on a flat memory model. However, for linux based systems, it is not a flat memory model and we are not so lucky. We intend to use a scatter DMA engine for achieving real-time performance under linux. We have chosen the SIS8300 module from Struck for our low-level RF system and BPMs. The firmware from Struck did not support the scatter DMA, thus we had to allocate linear memory space in the kernel space for the DMA, and needed to implement a bounce buffer to copy the DMA data to the user space. This led to a lag in real-time performance. Thus, we had to implement a scatter DMA technique to avoid the bounce buffer and to allocate the DMA buffer directly into the user space. During the firmware upgrade, we learned that the following steps: configuring the DMA engine, re-arming the DMA and waiting for interrupt should be an atomic operation. In this presentation we are going to discuss the details of our software experience with interrupt handling, and scatter DMA using the MicroTCA and linux platform.

Primary author

Dr Kukhee Kim (SLAC National Accelerator Laboratory)

Presentation materials