locking/spinlock/:why *nklock* used in many places? hello,
From: Carver lio <[email protected]>
We have some doubts on xenomai master.
We use ipipe-core-4.19.82-cip14-x86_64 + xenomai-3.1 on my machine with 16 processors; everything is fine until we run the *latency -t0* testcase on cpu1-cpu15 for our schedule benchmark.
What we found that the results of the testcase became very poor, worse than testing on one processor. Then we config *IPIPE_TRACE=y* and *XENO_OPT_DEBUG_LOCKING=y*, and run the same testcases, we found the delays of the testcase caused by the Global *nklock*.
We are wondering why the same lock *nklock* is used in many places in the xenomai source code. Is this necessary? Or do you have optimizations for this situation in the future?
Thanks.
Signature · 1 line
2.17.1
Quoted 8 lines · alex_luca--- via Xenomai
From: Carver lio <[email protected]>
We have some doubts on xenomai master.
We use ipipe-core-4.19.82-cip14-x86_64 + xenomai-3.1 on my machine with 16 processors; everything is fine until we run the *latency -t0* testcase on cpu1-cpu15 for our schedule benchmark.
Quoted 8 lines
What we found that the results of the testcase became very poor, worse than testing on one processor. Then we config *IPIPE_TRACE=y* and *XENO_OPT_DEBUG_LOCKING=y*, and run the same testcases, we found the delays of the testcase caused by the Global *nklock*.
We are wondering why the same lock *nklock* is used in many places in the xenomai source code. Is this necessary? Or do you have optimizations for this situation in the future?
Yes, this scalability limitation is well known and was primarily a trade-off between locking simplicity and the ability to run RT applications spread across a large number of cores.
Reasonable right now is 4, maybe 8 cores at most for RT usage. You can scale the whole system to much more, we are deploying 32 cores and had once a setup with almost 200 cores, but then only by restricting Xenomai (and consequently its RT threads) to a small subset.
It's on the long-term agenda to lift this limitation because it can bite you also earlier when you are hunting for microseconds between rather independent applications spread across cores, like in the scenario you created.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux