Re: Improving OOM killer

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Rientjes
Date: Wednesday, February 3, 2010 - 1:26 pm

On Wed, 3 Feb 2010, Frans Pop wrote:


The fundamentals are the same: negative values mean the task is less 
likely to be preferred and positive values mean the task is more likely, 
only the scale is different.  That scale is exported by the kernel via 
OOM_ADJUST_MIN and OOM_ADJUST_MAX and has been since 2006.  I don't think 
we need to preserve legacy applications or scripts that use hardcoded 
values without importing linux/oom.h.


The range is documented (but it should have been documented as being from 
OOM_ADJUST_MIN to OOM_ADJUST_MAX) but its implementation as a bitshift is 
not; it simply says that positive values mean the task is more preferred 
and negative values mean it is less preferred.  Those semantics are 
preserved.


If the baseline changes as we all agree it needs to such that oom_adj no 
longer represents the same thing it did in the first place (it would 
become a linear bias), I think this breakage is actually beneficial.  
Users will now be able to tune their oom_adj values based on a fraction of 
system memory to bias their applications either preferrably or otherwise.

I think we should look at Linux over the next couple of years and decide 
if we want to be married to the current semantics of oom_adj that are 
going to change (as it would require being a factor of 66, as you 
mentioned) when the implementation it was designed for has vanished.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Improving OOM killer, Lubos Lunak, (Mon Feb 1, 3:02 pm)
Re: Improving OOM killer, David Rientjes, (Mon Feb 1, 4:53 pm)
Re: Improving OOM killer, Lubos Lunak, (Tue Feb 2, 2:10 pm)
Re: Improving OOM killer, David Rientjes, (Tue Feb 2, 6:41 pm)
Re: Improving OOM killer, KAMEZAWA Hiroyuki, (Tue Feb 2, 6:52 pm)
Re: Improving OOM killer, KAMEZAWA Hiroyuki, (Tue Feb 2, 7:12 pm)
Re: Improving OOM killer, David Rientjes, (Tue Feb 2, 7:12 pm)
[patch] sysctl: clean up vm related variable declarations, David Rientjes, (Tue Feb 2, 7:36 pm)
Re: Improving OOM killer, KOSAKI Motohiro, (Wed Feb 3, 12:50 am)
Re: Improving OOM killer, Balbir Singh, (Wed Feb 3, 1:57 am)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 2:40 am)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 3, 5:10 am)
Re: Improving OOM killer, Balbir Singh, (Wed Feb 3, 5:25 am)
Re: Improving OOM killer, Rik van Riel, (Wed Feb 3, 7:49 am)
Re: Improving OOM killer, Minchan Kim, (Wed Feb 3, 8:00 am)
Re: Improving OOM killer, Minchan Kim, (Wed Feb 3, 9:06 am)
Re: Improving OOM killer, Balbir Singh, (Wed Feb 3, 10:01 am)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 11:58 am)
Re: Improving OOM killer, Frans Pop, (Wed Feb 3, 12:29 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 12:52 pm)
Re: Improving OOM killer, Frans Pop, (Wed Feb 3, 1:12 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 1:26 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 3, 2:22 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 3, 3:54 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 3, 3:55 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 5:00 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 3, 5:05 pm)
Re: Improving OOM killer, Rik van Riel, (Wed Feb 3, 5:18 pm)
Re: Improving OOM killer, Lubos Lunak, (Thu Feb 4, 12:58 am)
Re: Improving OOM killer, Jiri Kosina, (Thu Feb 4, 2:50 am)
Re: Improving OOM killer, David Rientjes, (Thu Feb 4, 2:34 pm)
Re: Improving OOM killer, David Rientjes, (Thu Feb 4, 2:39 pm)
Re: Improving OOM killer, David Rientjes, (Thu Feb 4, 2:48 pm)
Re: Improving OOM killer, Rik van Riel, (Thu Feb 4, 3:06 pm)
Re: Improving OOM killer, David Rientjes, (Thu Feb 4, 3:14 pm)
Re: Improving OOM killer, Frans Pop, (Thu Feb 4, 3:31 pm)
Re: Improving OOM killer, David Rientjes, (Thu Feb 4, 3:53 pm)
Re: Improving OOM killer, Oliver Neukum, (Fri Feb 5, 12:35 am)
Re: Improving OOM killer, David Rientjes, (Tue Feb 9, 8:10 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 10, 1:54 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 10, 1:54 pm)
Re: Improving OOM killer, Rik van Riel, (Wed Feb 10, 2:09 pm)
Re: Improving OOM killer, Rik van Riel, (Wed Feb 10, 2:10 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 10, 2:29 pm)
Re: Improving OOM killer, Lubos Lunak, (Wed Feb 10, 2:34 pm)
Re: Improving OOM killer, Alan Cox, (Wed Feb 10, 3:18 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 10, 3:25 pm)
Re: Improving OOM killer, David Rientjes, (Wed Feb 10, 3:31 pm)
Re: Improving OOM killer, Lubos Lunak, (Thu Feb 11, 2:50 am)
Re: Improving OOM killer, Lubos Lunak, (Thu Feb 11, 3:16 am)
Re: Improving OOM killer, David Rientjes, (Thu Feb 11, 2:17 pm)