+ * ASAP and that it won't get preempted by malicious userspace.Therefore, our dreams are in some way, the “messengers” of what is going on in our subconscious -these are the aspect that is most common hidden and not just that we cannot explain to ourselves. + * Make sure our oom reaper thread will get scheduled when Review (it doesn't help that changes outside of oom_kill.c are few Side effects I have never thought about so this really needs a _careful_ My oom hammering but I am not claiming it is 100% safe. I guess but I wanted to start as easy as possible. Think this is an improvement over the current situation already without Oom victim might not be holding a lot of private anonymous memory. Not 100% of course because we still depend on mmap_sem for read and the This is another step into making OOM killing more reliable. Race is detected by atomic_inc_not_zero(mm_users). mm_struct is pinned by mm_count to allow parallel exit_mmap and a Ncessary minimum and the reaper blocks any updates while it operates onĪn mm. Operation is potentially disruptive we are trying to limit it to the Means that only a single mm_struct can be reaped at the time. Updates mm_to_reap with cmpxchg to guarantee only NUll->mm transitionĪnd oom_reaper clear this atomically once it is done with the work. The API between oom killer and oom reaper is quite trivial. Requests done with the lock held to absolute minimum to reduce the risk To use _killable waiting as much as possible and reduce allocations Users of mmap_sem which need it for write should be carefully reviewed We are using only a trylock and retry 10 times with a short sleep Order to prevent from blocking on the lock without any forward progress Solution is not 100% because the semaphore might be held or blockedįor write while write but the probability is reduced considerably wrt.īasically any lock blocking forward progress as described above. Oom_reaper has to take mmap_sem on the target task for reading so the Like another good fit is not appropriate as well because it might get Invocation so workqueue context is not appropriate because all the More important than debugability of a particular application.Ī kernel thread has been chosen because we need a reliable way of This isĬonsidered a reasonable constrain because the overall system health is In the process of coredumping the result would be incomplete. There is one notable exception to this, though, if the OOM victim was Owned by the oom victim under an assumption that such a memory won'tīe needed when its owner is killed and kicked from the userspace anyway. Memory by preemptively reaping the anonymous or swapped out memory Specialized kernel thread (oom_reaper) which tries to reclaim additional This patch reduces the probability of such a lockup by introducing a lock) which is blocked by another task looping in the page Might be blocked in the uninterruptible state waiting for on an event The OOM victim might take unbounded amount of time to exit because it by Tetsuo Handa) that it is not that hard toĬonstruct workloads which break the core assumption mentioned above and Via mark_oom_victim to allow a forward progress should there be a need Such a task (oom victim) will get an access to memory reserves Hope that the task will terminate in a reasonable time and frees up its The OOM killer currently allows to kill only a single task in a good Independently brought up by Oleg Nesterov. This is based on the idea from Mel Gorman discussed during LSFMM 2015 and Mm, oom: introduce oom reaperĪndrew Morton, Linus Torvalds, Mel Gorman ,ĝavid Rientjes, Tetsuo Handa, Rik van Riel, Hugh Dickins, Oleg Nesterov ,Ěndrea Argangeli, LKML, Michal Hocko
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |