1.5 KiB
title, type, source, source_url, author, handle, post_id, date, archived, draft, tags, description, in_reply_to
| title | type | source | source_url | author | handle | post_id | date | archived | draft | tags | description | in_reply_to | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Working on the Linux thread priority code. | archive | https://x.com/NOTimothyLottes/status/2071937360288235902 | NOTimothyLottes | NOTimothyLottes | 2071937360288235902 | 2026-06-30 | 2026-08-23 | false |
|
Working on the Linux thread priority code. |
Source
- URL: https://x.com/NOTimothyLottes/status/2071937360288235902
- Author: NOTimothyLottes (@NOTimothyLottes)
- Posted: 2026-06-30 12:42:16
Thread
1/ @NOTimothyLottes ^2071937360288235902
Working on the Linux thread priority code. Linux doesn't allow sched_attr.size to be minimized to just what is required for the scheduling mode (my prior bug). So I statically allocate the structures already filled in and cacheline aligned ...
2/ @NOTimothyLottes ^2071938112175890466
Theory says: better for size, worse for perf! Global structure will miss the cache. The alternative is to allow the code to generate the structure on the stack, which is likely in cache, and burn a few more cachelines of code (which gets linear prefetch).
3/ @NOTimothyLottes ^2071938677584863448
Clearly the default linux won't allow my non-blessed user to get SCHED_FIFO, and it also seems like my nice(-20) SCHED_OTHER backup is also not allowed either. Damn. More stuff to workaround.