[$] Out-of-memory victim selection with BPF
In its default configuration, the Linux kernel will allow processes toallocate more memory than the system can actually provide; this policyenables better utilization of physical memory and works just fine - most ofthe time. On occasions, though, the kernel may find itself unable toprovide memory that processes may think already belongs to them. If thesituation gets bad enough, the only solution (short of rebooting) is todeclare a sort of memory bankruptcy and write off some of the kernel'sdebts by killing one or more processes. Over the years, a great deal ofeffort has gone into heuristics to select the processes that the user isleast likely to miss. This problem is still clearly not solved toeverybody's satisfaction, though, so it was only a matter of time beforesomebody introduced a way to select the out-of-memory (OOM) victim usingBPF.