How to Identify and Resolve Latency Spikes in a Linux GPIO Application Using Preempt_rt Kernel Patch

Hi guys, during a discussion yesterday, my colleague and I were exploring ways to detect and solve latency problems in a Linux-centric setup. We kinda needed some insights regarding the matter. We're experiencing increased response times that's up to 20ms in a Linux GPIO application after running tests for several hours. The usual response time is around 150 microseconds. We're using a Preempt_rt kernel patch. My question is is this ,are there any recommended tools or techniques to identify which processes or drivers might be causing these latency spikes during extended testing? @Middleware & OS
4 Replies
Dtynin
Dtynin4w ago
@Sterling I'd recommend using strace and ftrace to identify processes or drivers causing latency spikes in your Linux GPIO application.
Marvee Amasi
Marvee Amasi4w ago
@Sterling 20ms latency spikes sound rough to point out the culprit
Sterling
Sterling4w ago
I would look into that @Dtynin
Marvee Amasi
Marvee Amasi4w ago
Check kernel logs , your dmesg for GPIO-related issues. https://www.geeksforgeeks.org/how-to-use-the-dmesg-command-on-linux/
GeeksforGeeks
How to View Kernel Messages in Linux | dmesg Command - GeeksforGeeks
A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes and practice/competitive programming/company interview Questions.
From An unknown user
From An unknown user
From An unknown user
From An unknown user
Want results from more Discord servers?
Add your server
More Posts
Are there alternatives to system() that might be more performant for CGI scripts on embedded Linux?I'm facing a performance issue with the system() call in C on my embedded Linux system. The command What exactly do inner and outer cache policies refer to?Hey guys @Middleware & OS I am trying to develop my own RTOS kernel for a Cortex-M7 STM32F746 DiscoDeveloping a smart thermostat device using Android Things OS@Middleware & OS Hey guys, I'm developing a smart thermostat device using Android Things OS. I woulDeveloping automotive test systems with STM32 Nucleo devices (like Nucleo144) using RTOSI've been working with STM32 Nucleo boards (mainly Nucleo144) for basic projects using CubeIDE. Now How to Keep Spring Boot App Running After Closing PuTTY Session Without Using a Linux Service?Hi Everyone, I'm running a Spring Boot application with an embedded Tomcat server deployed as an exeIs it possible to compile Busybox directly into the initramfs during the kernel build process?@Middleware & OS I'm working on an embedded Linux system and want to use Busybox for its small foothow can I send data from a smart door lock to Azure IoT Hub?@Middleware & OS Hey guys, how can I send data from a smart door lock device(lock status, access atAny tips for a smooth transition from mbed to Zephyr development?@Middleware & OS I've written a C++ LCD driver using PlatformIO and mbed. Now I'm setting up ZephyrBuilding an embedded Linux system for an A20-based board using Buildroot@Middleware & OS I'm building an embedded Linux system for an A20-based board using Buildroot. The Embedded Software Development: 5G/6G Project -IIT HyderabadEmbedded Development (5G/6G Project): IIT HYD, INDIA Experience: 2-5 years Location: Hyderabad