This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM623: GPIO interrupt latency test

Part Number: AM623

Hi Team,

We tested AM62x GPIO interrupt latency, and got below result, it is not good as expectation.

The test RT Linux kernel version is 5.10.168 (SDK8.6) and 6.1.26(SDK9.0.x).

The GPIO test code is attached, and use AM62x RT_Linux SDK default file system.

Kernel 5.10.168:

Kernel 6.1.26

[  792.876204] time_delta: 124us
[
  793.125308] time_delta: 108us
[
  793.126202] time_delta: 102us
[
  803.127109] time_delta: 0us
[
  813.128019] time_delta: 0us
[
  823.128932] time_delta: 4us
[
  833.129838] time_delta: 4us
[
  843.130748] time_delta: 4us
[
  853.131657] time_delta: 0us
[
  863.132567] time_delta: 0us
[
  873.133480] time_delta: 4us
[
  883.134387] time_delta: 4us
[
  893.135297] time_delta: 0us
[
  903.136207] time_delta: 0us
[
  912.609387] time_delta: 265us
[
  912.610118] time_delta: 262us
[
  922.611031] time_delta: 0us
[
  922.689189] time_delta: 160us
[
  922.690028] time_delta: 156us
[
  924.705136] time_delta: 123us
[
  924.706008] time_delta: 122us

As you can see, the latency jitter is much, could you help analysis and dig out the reason?

Also for cyclictest, under stress -ng, we can see kernel   6.1.26 have some improvement than kernel 5.10.168, but for GPIO interrupt latency test result, the benchmark is same.

-Thomas

  • Hey Thomas,

    Latency in general on the RT SDK isn't as optimized as it could be. This SDK is generated by essentially taking our normal SDK and dropping a RT kernel into it. A neat concept, but unfortunately it's not an accurate representation of our devices in a proper real time application. Ideally you would be using a cutdown init system with a reduced service count targeted around a particular application. Please try testing one of the lighter build targets in Yocto, such as the tisdk-tiny-image.

    If you want examples of optimal configurations for particular machine and workload combinations, RHEL and several other distros include rather nice real time kernel tuning guides.

    Regards,

    Randolph Sapp

  • Hi  Sapp

    SDK9 have thinlinux image, no tisdk-tiny-image, are you talking about thinlinux image?

    -Thomas

  • Since we couldn't find a tisdk-tiny version of the system on Sdk9.0, we tested it using the tisdk-base version instead. However, the results did not improve; in fact, they even worsened significantly.

    [ 97.005062] time_delta: 3us
    [09:12:11][ 107.005957] time_delta: 3us
    [09:12:21][ 117.006850] time_delta: 0us
    [09:12:31][ 127.007744] time_delta: 0us
    [09:12:33][ 128.796976] time_delta: 157us
    [09:12:33][ 128.797783] time_delta: 162us
    [09:12:40][ 136.205006] time_delta: 257us
    [09:12:40][ 136.205703] time_delta: 268us
    [09:12:40][ 136.212304] time_delta: 2577us
    [09:12:40][ 136.212906] time_delta: 377us
    [09:12:40][ 136.215940] time_delta: 2038us
    [09:12:40][ 136.219027] time_delta: 2095us
    [09:12:40][ 136.222005] time_delta: 1978us
    [09:12:40][ 136.225078] time_delta: 2073us
    [09:12:40][ 136.228149] time_delta: 2070us
    [09:12:40][ 136.231217] time_delta: 2067us
    [09:12:40][ 136.234281] time_delta: 2063us
    [09:12:40][ 136.237412] time_delta: 2131us
    [09:12:40][ 136.240517] time_delta: 2105us
    [09:12:40][ 136.243603] time_delta: 2085us
    [09:12:40][ 136.246658] time_delta: 2054us
    [09:12:40][ 136.249735] time_delta: 2077us
    [09:12:40][ 136.252809] time_delta: 2073us
    [09:12:40][ 136.255904] time_delta: 2094us
    [09:12:40][ 136.258979] time_delta: 2075us
    [09:12:40][ 136.262038] time_delta: 2059us
    [09:12:40][ 136.265100] time_delta: 2062us
    [09:12:40][ 136.268165] time_delta: 2065us
    [09:12:40][ 136.271235] time_delta: 2069us
    [09:12:40][ 136.274284] time_delta: 2049us
    [09:12:40][ 136.277363] time_delta: 2078us
    [09:12:40][ 136.280439] time_delta: 2076us
    [09:12:40][ 136.283504] time_delta: 2065us
    [09:12:40][ 136.286551] time_delta: 2046us
    [09:12:40][ 136.289610] time_delta: 2059us
    [09:12:40][ 136.289637] time_delta: 973us
    [09:12:40][ 136.292695] time_delta: 2058us

  • Ah, unfortunately irqbalance is only present in the default image. Not entirely sure why. It's a small application with reasonable performance improvements attached to it, assuming it's tuned properly. I'll start poking at the Foundational SDK guys about including that in one of the core package groups.

    Sorry about the lack of the tisdk-tiny in the 9.0 release, one of my patches to resolve some systemd issues actually broke sysVinit in that release so it was not published. If you build it now with Yocto and the tip of meta-arago the issue should be resolved and you can add irqbalance as an IMAGE_INSTALL:append for testing.