It's nice to get the textual description, but pretty much every specific detail of the extended explanation teased out at the end includes things which are more or less incorrect but which nonetheless sound very believable. In essence, what happened at the end was GPT-3 was asked to write an OOM-killer-inspired story. I think this should be a cautionary tale against trying to use GPT-3 to provide commentary beyond a high-level summary.<p>This isn't a slight against the short-summary technique, which seems very cool.<p>Details: oom_adj isn't a flag, it's an int which can disable OOM on a per-process-leader basis but can also but can also be used to reduce the "badness" of a process when considering what to kill. Oom_adj is also deprecated and has been replaced by oom_score_adj. The OOM algorithm isn't called RSS. It doesn't seem to have been explicitly named, but the function which performs the key calculation is named oom_badness. This function assigns an integer "badness" to each process. A process' resident set size <i>is</i> an important part of calculating badness, but it's affected by several other factors (what they are depends on kernel version but they include the adjustment parameter). RSS is not (part of) the OOM calculation "by default" -- it's always included unless OOM is disabled entirely. RSS isn't a comparison of reserved physical memory against current virtual size, it's just the amount of RAM currently occupied by a process (i.e. not in swap or on disk). The OOM killer doesn't compare RSS against virtual size. RSS doesn't trigger the OOM killer. RSS isn't an algorithm.<p>Another interesting aspect of this, of course, is that GPT-3 likely wasn't trained on any specific kernel version, but on a large number of versions depending on which part of the Internet it happened to be reading. This means that it probably can't give a good account of any single version of fast-changing parts of the kernel like the OOM killer.<p>Source: <a href="https://github.com/torvalds/linux/blob/master/mm/oom_kill.c" rel="nofollow">https://github.com/torvalds/linux/blob/master/mm/oom_kill.c</a>