On Mon 26-11-12 15:19:18, Johannes Weiner wrote: > On Mon, Nov 26, 2012 at 09:08:48PM +0100, Michal Hocko wrote: [...] > > OK, I guess I am getting what you are trying to say. So what you are > > suggesting is to just let mem_cgroup_out_of_memory send the signal and > > move on without retry (or with few charge retries without further OOM > > killing) and fail the charge with your new FAULT_OOM_HANDLED (resp. > > something like FAULT_RETRY) error code resp. ENOMEM depending on the > > caller. OOM disabled case would be "you are on your own" because this > > has been dangerous anyway. Correct? > > Yes. > > > I do agree that the current endless retry loop is far from being ideal > > and can see some updates but I am quite nervous about any potential > > regressions in this area (e.g. too aggressive OOM etc...). I have to > > think about it some more. > > Agreed on all points. Maybe we can keep a couple of the oom retry > iterations or something like that, which is still much more than what > global does and I don't think the global OOM killer is overly eager. Yes we can offer less blood and more confort > > Testing will show more. > > > Anyway if you have some more specific ideas I would be happy to review > > patches. > > Okay, I just wanted to check back with you before going down this > path. What are we going to do short term, though? Do you want to > push the disable-oom-for-pagecache for now or should we put the > VM_FAULT_OOM_HANDLED fix in the next version and do stable backports? > > This issue has been around for a while so frankly I don't think it's > urgent enough to rush things. Yes, but now we have a real usecase where this hurts AFAIU. Unless we come up with a fix/reasonable workaround I would rather go with something simpler for starter and more sofisticated later. I have to double check other places where we do charging but the last time I've checked we don't hold page locks on already visible pages (we do precharge in __do_fault f.e.), mem_map for reading in the page fault path is also safe (with oom enabled) and I guess that tmpfs is ok as well. Then we have a page cache and that one should be covered by my patch. So we should be covered. But I like your idea long term. Thanks! -- 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>