[RESOLVED] Process priority auto change
STiNG
Status: New User - Welcome
Joined: 29 Nov 2022
Posts: 2
Location: Uzbekistan
Reply Quote
Hi,
I know there is a feature in Liquorix kernel that dynamically changes the process priority. Can you tell how to build my own kernel with this possibility? (Screenshot attached)

[link]
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
The value under PRI is not manageable from user space: peteris.rocks/blog/htop/#process-niceness-and-priority

:: Quote ::
The priority (PRI) is the kernel-space priority that the Linux kernel is using. Priorities range from 0 to 139 and the range from 0 to 99 is real time and 100 to 139 for users.

You can change the nicesness and the kernel takes it into account but you cannot change the priority.


It's an internal value that's the result of applying an algorithm against the process nice and the scheduler class (like NORMAL/FIFO/RR). If you want some auto applied nice value, you can look at ananicy: github.com/Nefelim4ag/Ananicy
Back to top
STiNG
Status: New User - Welcome
Joined: 29 Nov 2022
Posts: 2
Location: Uzbekistan
Reply Quote
So you mean ananicy is included in your kernel? Because it is changing dynamically only when I run linux on your kernel.
Back to top
damentz
Status: Assistant
Joined: 09 Sep 2008
Posts: 1122
Reply Quote
Let me be more clear, there is no code in Liquorix to change priorities of processes. What you're seeing is purely cosmetic in htop.

You can ask the author if PDS why the numbers are changing or why they're set to anything at all here: gitlab.com/alfredchen/linux-prjc/-/issues. However, just understand that the numbers don't mean anything and are not used unless the scheduling class is RR or FIFO.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours