On 06/28, Michal Hocko wrote: > > On Mon 27-06-16 19:55:55, Oleg Nesterov wrote: > > On 06/27, Michal Hocko wrote: > > > > > > On Mon 27-06-16 17:51:20, Oleg Nesterov wrote: > > > > > > > > Yes I agree, it would be nice to remove find_lock_task_mm(). And in > > > > fact it would be nice to kill task_struct->mm (but this needs a lot > > > > of cleanups). We probably want signal_struct->mm, but this is a bit > > > > complicated (locking). > > > > > > Is there any hard requirement to reset task_struct::mm in the first > > > place? > > > > Well, at least the scheduler needs this. > > Could you point me to where it depends on that? I mean if we are past > exit_mm then we have unmapped the address space most probably but why > should we care about that in the scheduler? There shouldn't be any > further access to the address space by that point. I can see that > context_switch() checks task->mm but it should just work when it sees it > non NULL, right? But who will do the final mmdrop() then? I am not saying this is impossible to change, say we do this in finish_task_switch(TASK_DEAD) or even in free_task(), but we do not want this? > Do you think this would be a way to go, though? We would have to special > case this because the mm_struct is quite large (~900B with my config) so > we would keep and pin it only for oom victims. Plus page tables, so it is more than 900B. But as I said, personally I agree with signal->oom_mm which can only be set by oom-killer. Oleg. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>