Adds Process::oom_score_adj#139
Adds Process::oom_score_adj#139vrmiguel wants to merge 1 commit intoeminence:masterfrom vrmiguel:oom_score_adj
Process::oom_score_adj#139Conversation
eminence
left a comment
There was a problem hiding this comment.
Hi! 👋
Sorry it took so long to review this PR, it totally fell off my radar until now.
I'm reading the documentation on oom_score_adj, and it's a little confusing. But it says this:
The value of
/proc/<pid>/oom_score_adjis added to the badness score before it
is used to determine which task to kill. Acceptable values range from -1000
(OOM_SCORE_ADJ_MIN) to +1000 (OOM_SCORE_ADJ_MAX).
So the way I read this is: while the final OOM "score" will be somewhere between 0 and 1000, the value reported in oom_score_adj can be between -1000 and 1000. So I think the oom_score_adj function should return a i16 not u32.
Also, you could please tweak the doc string slightly:
- Put a new line after a short description of the function (then can come the full function description)
- Add "(since Linux 2.6.36)" at the very end of the doc string
Thanks!
|
Hi @vrmiguel Just checking in to see if you still if you're able to make the requested change. If not, that's no problem at all, I can make it myself. Thanks! |
Hey there!
This PR adds
oom_score_adjtoProcess.I don't know the minimum Linux version that has this property, though.
If merged, I plan to use this function during the testing of a small OOM killer of my own, bustd :D