On Thu 07-07-16 10:39:32, Michal Hocko wrote: > On Sun 03-07-16 17:09:04, Michael S. Tsirkin wrote: > [...] > > Having said all that, how about we just add some kind of per-mm > > notifier list, and let vhost know that owner is going away so > > it should stop looking at memory? > > But this would have to be a synchronous operation from the oom killer, > no? I would really like to reduce the number of external dependencies > from the oom killer paths as much as possible. This is the whole point > of these patches. If we have a notification mechanism, what would > guarantee that the oom killer would make a forward progress if the > notified end cannot continue (wait for a lock etc...)? > > I do realize that a test per each memory access is not welcome that > much. An alternative would be to hook the check into the page fault > handler because then the overhead would be reduced only to the slowpath > (from the copy_from_user POV). But then also non use_mm users would have > to pay the price which is even less attractive. > > Another alternative would be disabling pagefaults when copying from the > userspace. This would require that the memory is prefault when used > which might be a problem for the current implementation. ping Michael... I would like to pursue this again and have something for 4.9 ideally. -- Michal Hocko SUSE Labs -- 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>