This could be just my inexperience with using an RTOS (and NuttX)!
This stems from me having a thread to handle LVGL. It seems to only run
its usual update function every 200ms - the RR default - rather than the
supposed 1ms it wants; but I am yet to try and prove this to be fair.
If I'm right, my LVGL thread needs to run MUCH more frequently. But it
could be my whole approach is wrong here.
My suggestion would be that RR slice has a default of 200, so nothing
breaks. But add a new SCHED_PRIORITY which does nothing other than
change the RR slice to 0, and to make this clear in Kconfig. Then follow
up with documentation change.
I have no view on RST vs Markdown but, for sure, Markdown is easier
given my limited experience as previewers seem to work well (for me)
On 26/11/2025 18:40, Alan C. Assis wrote:
Do you suggest moving from RST to Markdown?
I think SCHED_PRIORITY is not a standard definition, at least I didn't find
it in POSIX.
You can propose using RR slice equal 0 by default, but I don't know the
side effects (it could be considered a breaking change, because some user
applications could stop working or behave strangely).
BR,
Alan
On Wed, Nov 26, 2025 at 3:27 PM Tim Hardisty <[email protected]>
wrote:
I don't mind doing documentation - but it does take a lot more effort
since RST doesn't have very good previewers that I have found: it is
difficult to know if will it render correctly on the website unless you
do the whole RST build stuff.
Quicker - if agreeable as a short term fix - would be to add a Kconfig
option to specifically choose the scheduling option, with an appropriate
CONFIG_RR_INTERVAL setting of 0 for SCHED_PRIORITY or 200ms for
SCHED_RR? That would mean no code changes as such?
Something like that anyway. If it fixes my issue, I can play with this
and do a PR
On 26/11/2025 18:16, Alan C. Assis wrote:
Guess what? We are still missing a proper Documentation! :-)
BR,
Alan
On Wed, Nov 26, 2025 at 3:11 PM Tim Hardisty <[email protected]>
wrote:
So do we agree the documentation is at best misleading? And, to me,
simply wrong?
On 26/11/2025 18:07, Alan C. Assis wrote:
Exactly!
You can refer to sched/sched/sched_timerexpiration.c line 207
On Wed, Nov 26, 2025 at 3:00 PM Tim Hardisty <[email protected]>
wrote:
That's what I inferred (yet to try it) - so is the documentation
misleading since the default CONFIG_RR_INTERVAL=200 forces RR
scheduling
rather than the stated "strict priority scheduling"?
On 26/11/2025 17:54, Alan C. Assis wrote:
CONFIG_RR_INTERVAL=0
On Wed, Nov 26, 2025 at 2:22 PM Tim Hardisty <
[email protected]>
wrote:
Apologies if this isn't really a NuttX question...
Documentation says "By default, NuttX performs strict priority
scheduling".
Default CONFIG_RR_INTERVAL is 200ms.
I have multiple threads, but have not set any scheduling parameters,
but
it seems threads are being scheduled every 200ms rather on a
priority
basis.
What *should* I be doing, please, to get all my threads scheduled by
priority?
Thanks,
TimH
PS - yes I have thrown myself in the deep end without a life jacket
with
my project. And I'm no doubt up ****-creek without a paddle. But I
am
always learning!