You'll want to look at section 3.1 of Documentation/filesystems/proc.txt,
which describes /proc/pid/oom_score_adj, not 3.2.
I'd hesitate to state the formula outside of the implementation and
instead focus on the semantics of oom_score_adj (as a proportion of
available memory compared to other tasks), which I tried doing in section
3.1. Then, the userspace tool only need be concerned about the units of
oom_score_adj rather than whether rss, swap, or later extentions such as
shm are added.
Thanks for working on this, Kame!
--