On Tue, 8 Mar 2011 22:44:11 -0800 (PST) David Rientjes <rientjes@xxxxxxxxxx> wrote: > On Wed, 9 Mar 2011, KAMEZAWA Hiroyuki wrote: > > Aside from my specific usecase for this tunable, let me pose a question: > > > do you believe that the memory controller would benefit from allowing > > > users to have a grace period in which to take one of the actions listed > > > above instead of killing something itself? Yes, this would be possible by > > > setting and then unsetting memory.oom_control, but that requires userspace > > > to always be responsive (which, at our scale, we can unequivocally say > > > isn't always possible) and doesn't effectively deal with spikes in memory > > > that may only be temporary and doesn't require any intervention of the > > > user at all. > > > > > > > Please add 'notifier' in kernel space and handle the event by kernel module. > > It is much better than 'timeout and allow oom-kill again'. > > > > A kernel-space notifier would certainly be helpful, but at what point does > the kernel choose to oom kill something? If there's an oom notifier in > place, do we always defer killing or for a set period of time? For google, as you like. For me, I want an oom-killall module Or oom-SIGSTOP-all module. oom-killall will be useful for killing fork-bombs and very quick recovery. For me, the 1st motivation of oom-disable is to taking core-dump of memory leaking process and look into it for checking memory leak. (panic_on_oom -> kdump is used for supporting my customer.) Maybe my example of notifier user doesn't sounds good to you, please find a good one. > If it's the latter then we'll still want the timeout, otherwise there's no > way to guarantee we haven't killed something by the time userspace has a chance > to react to the notification. > You can get a list of tasks in the cgroup and send SIGNALs with filters you like. List of thread-IDs can be got easily with cgroup_iter_xxx functions. Anyway, if you add notifier, please give us a user of it. If possible, it should be a function which can never be implemented in userland even with sane programmers, admins, and users. For example, if all process's oom_score_adj was set to -1000 and oom-killer doesn't work, do you implement a timeout ? I think you'll say it's a wrong configuration. memcg's oom_disable timeout is the same thing. Thanks, -Kame -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>