Feedback on sched_quota modification

Marco Barletta barlettamarco8 at
Sun May 16 13:11:02 CEST 2021

Hi everyone;
you can find attached the modification I made to sched_quota in order to
have a hierarchical scheduler. Actually original sched_quota wasn't truly
hierarchical since when a group expires and has a lot of thread ready to
run, it considers one by one threads and on the go flushes them to the
expired list. In this there's a problem since this operation could not be
bounded in time since it's O(n) and could be nasty for theoretical analysis
in hard-real-time systems.
If you are interested in such modification in order to add it as a sched
modification or to add it as a new scheduler, I'd be delighted to have a
feedback from you.
I had some problems to handle kick function because of the double runnable
queue. Moreover I want to specify that I choose to implement the runnable
list of groups with a linked list and not xnsched_queue_t since we expect
just a few goups and anyway their number is bounded by compile time macro,
so is still O(1).
Best regards.

Marco Barletta
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quota.patch
Type: text/x-patch
Size: 12996 bytes
Desc: not available
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/zip
Size: 20340 bytes
Desc: not available
URL: <>

More information about the Xenomai mailing list