Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1256307
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCHv2 4.3-rc6] proc: fix convert from oom_score_adj to oom_adj |
| Date | 2015-10-26 22:50 +0100 |
| Message-ID | <qnXOr-526-23@gated-at.bofh.it> (permalink) |
| References | <qmi0W-2WT-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
[Multipart message — attachments visible in raw view] - view raw
On Thu, 22 Oct 2015, Hongjie Fang (方洪杰) wrote: > > The oom_adj has been replaced by oom_score_adj in kernel, > but the /proc/pid/oom_adj is provided for legacy purposes. > When write/read a value into/from /proc/pid/oom_adj, > there is a transformation between oom_adj and oom_score_adj. > > After writing a new value into /proc/pid/oom_adj, then read it. > The return value is a different value than you wrote. > Fix this by adding a adjustment factor. > You're only looking at the output and seeing that it disagrees with what was written and ignoring _why_ it disagrees. It's because, as I already stated, oom_score_adj is the effective tunable for oom kill process prioritization and the legacy oom_adj had a different scale where a 1:1 mapping is not possible. All throughout the kernel, we report the effective value. We accept writes and the reads report the effective value. This is no different. Nack again.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCHv2 4.3-rc6] proc: fix convert from oom_score_adj to oom_adj Hongjie Fang (方洪杰) <Hongjie.Fang@spreadtrum.com> - 2015-10-22 09:00 +0200
Re: [PATCHv2 4.3-rc6] proc: fix convert from oom_score_adj to oom_adj Michal Hocko <mhocko@kernel.org> - 2015-10-22 11:50 +0200
Re: [PATCHv2 4.3-rc6] proc: fix convert from oom_score_adj to oom_adj David Rientjes <rientjes@google.com> - 2015-10-26 22:50 +0100
Re: [PATCHv2 4.3-rc6] proc: fix convert from oom_score_adj to oom_adj Michal Hocko <mhocko@kernel.org> - 2015-10-27 13:40 +0100
csiph-web