| Summary: | /proc/self/oom_adj needs to use /proc/self/oom_score_adj | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | David Rientjes <rientjes> | ||||||
| Component: | sshd | Assignee: | Assigned to nobody <unassigned-bugs> | ||||||
| Status: | CLOSED FIXED | ||||||||
| Severity: | minor | CC: | djm, donald.r.gray, dtucker, pipping, rientjes, vapier | ||||||
| Priority: | P2 | ||||||||
| Version: | 5.6p1 | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 1803 | ||||||||
| Attachments: |
|
||||||||
|
Description
David Rientjes
2010-11-16 11:31:09 AEDT
Created attachment 1957 [details]
openssh-linux-new-oomkill.patch
Try new OOM interface first then fall back if necessary. Tested only on 2.6.32.
Comment on attachment 1957 [details]
openssh-linux-new-oomkill.patch
Works for me (2.6.32) but it would be nice if someone with a 2.6.36+ kernel could confirm it behaves as expected on that too.
ping: Darren's patch can't go in until someone with a 2.6.36 system tests his patch. (In reply to comment #3) > ping: Darren's patch can't go in until someone with a 2.6.36 system > tests his patch. Tested on 2.6.36-ck5-r5 x86_64 openssh-5.6_p1 Error is gone from dmesg when restarting sshd. value of /proc/$PID/oom_score_adj is -1000 value of /proc/$PID/oom_adj is -17 your oom_adjust should be static and constant, and you should be using ARRAY_SIZE() instead of "2" The idiom we use is to have a sentinel array entry with an obvious NULL or -1 somewhere we can test for: for (i = 0; whatever[i].fnord != NULL; i++) ... Created attachment 1980 [details]
Switched to end-of-array sentinel.
fair comments, I've changed it to use the sentinel since that's consistent with what we do elsewhere.
Thanks, this has been committed and will be in 5.7p1. Move resolved bugs to CLOSED after 5.7 release |