Re: SCHED_SPORADIC in Xenomai 3
Jan Kiszka <[email protected]>
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
On 11.06.26 09:33, Philippe Gerum wrote: > > Hi Jan, > > Jan Kiszka <[email protected]> writes: > >> Hi Philippe, >> >> while trying to port the signal-while-suspended fix to Xenomai 3, I ran >> into XNHELD, a state only existing there. I suppose that was once >> forward-ported as EVL_T_HALT. The only user of XNHELD in Xenomai 3 is >> SCHED_SPORADIC - so let's dive into that scheduling class. >> >> Turned out it was never documented, not even linked to the POSIX >> standard. But it also slightly differs from it (low_prio = -1 -> suspend >> on depletion). There is also no test case, so I asked an AI for one. >> That worked fairly well as it seems to have revealed an issue: >> >> Could it be that we are not properly suspending the budget tracking when >> a higher-prio task from a different scheduling class is preempting a >> sporadic thread? It looks like that xnsched_sporadic_pick is not invoked >> if a thread is selected from a higher-prio class first, namely sched-rt >> with its weight 4 vs. 3 if sched-sporadic. Or is that an (undocumented) >> limitation/misconfiguration? Is that issue even affecting other >> time-slicing classes as well?? > > Yes, this is a systemic bug. We need to tell classes that some thread of > theirs is scheduling out. > OK, then please have a look of my proposal from today. If it makes sense, I'm happy to submit it for x3 as well as linux-evl patch. >> >> That furthermore makes me wonder if we actually have users of >> sched-sporadic. Likely a hard to answer question, as usual. But such a >> limitation should have been observed earlier under real workload... >> > > I only know of one user, back in 2009. Never received any feedback since > then. > Hmm, I'm inclined to retire it then. @all: If there are users today, please speak up now! Jan -- Siemens AG, Foundational Technologies Linux Expert Center