Messages in this thread | | | Date | Fri, 17 Oct 2014 08:59:47 +0200 | From | Michal Hocko <> | Subject | Re: + freezer-check-oom-kill-while-being-frozen.patch added to -mm tree |
| |
On Thu 16-10-14 22:39:54, Oleg Nesterov wrote: > > Fix the issue by checking for TIF_MEMDIE thread flag and get away from the > > fridge if it is set. oom_scan_process_thread doesn't have to check for > > the frozen task anymore because do_send_sig_info will wake up the thread > > and TIF_MEMDIE is already set by that time. > > I must have missed something... but __refrigerator() sleeps in > TASK_UNINTERRUPTIBLE and do_send_sig_info() won't wake it up?
Ouch, I have completely missed this part when reviewing Cong's original patch. I got confused by the retry loop. Anyway you are right and the patch as is currently doesn't work as intented.
Can we simply make the task sleep interruptible? It retries and rechecks the freezing conditions after wakeup anyway. It is true this would be a user visible change because frozen tasks won't be in D state anymore (this would make a difference for cgroup freezing because nobody would see this in PM freezer). Does anybody depend on this?
Another possible way would be reintroducing freezer check into OOM path and kick the task even when it is in UN state.
Thanks! -- Michal Hocko SUSE Labs
| |