[compiler-rt] [compiler-rt][rtsan] sched cpu affinity for linux interception. (PR #124194)
Chris Apple via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 17:16:02 PST 2025
cjappl wrote:
Ok, I want to maybe chat this over with @davidtrevelyan and you.
This may fall into the "yes it is real-time-unsafe, but people do it when they are setting up so it is probably fine?"
For instance, to promote something to a real-time thread, or depromote it to a normal thread you use the call `pthread_setschedparam`, which you call from the thread that you want promoted.
I believe at least on mac, they recommend you depromote a real-time thread before you join it, calling anything else undefined.
So if a user calls these functions, they are technically interacting with the kernel, which is RT-unsafe, however, you must do it to get a rt-thread. This presents a kind of chicken-egg thing.
My personal feelings are that we should NOT intercept these calls, as I would be annoyed as a user to have to suppress them or ignore them.
Anyone else have any thoughts?
https://github.com/llvm/llvm-project/pull/124194
More information about the llvm-commits
mailing list