Skip to contentSkip to conversation

make OOM more "user friendly"

PATCH Diego Calleja 3 participants 4 messages Apr 2, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

When people gets OOM messages, many of them don't know what is happening or what OOM means. This brief message explains it.

mm/oom_kill.c renamed from mm/oom_kill.c.orig +2 -1
@@ -189,7 +189,8 @@
 		return;
 	}
 	task_unlock(p);
-	printk(KERN_ERR "Out of Memory: Killed process %d (%s).\n", p->pid, p->comm);
+	printk(KERN_ERR "The system has run Out Of Memory (RAM + swap), a process will be killed to free some memory\n");
+	printk(KERN_ERR "OOM: Killed process %d (%s).\n", p->pid, p->comm);
 
 	/*
 	 * We give our sacrificial lamb high priority and access to
#1 lore raw
Quoted 16 lines · Diego Calleja

When people gets OOM messages, many of them don't know what is happening or what OOM means. This brief message explains it.

mm/oom_kill.c renamed from mm/oom_kill.c.orig +2 -2
@@ -189,7 +189,8 @@
 		return;
 	}
 	task_unlock(p);
-	printk(KERN_ERR "Out of Memory: Killed process %d (%s).\n", p->pid, p->comm);
+	printk(KERN_ERR "The system has run Out Of Memory (RAM + swap), a process will be killed to free some memory\n");
+	printk(KERN_ERR "OOM: Killed process %d (%s).\n", p->pid, p->comm);
 
 	/*
 	 * We give our sacrificial lamb high priority and access to
-
Quoted 7 lines

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

I disagree this is _not_ usefull. If the user don't knows what OOM means he can use google to get this information.

Matthias-Christian Ott

#2 lore raw
Quoted 2 lines · Matthias-Christian Ott

I disagree this is _not_ usefull. If the user don't knows what OOM means he can use google to get this information.

And google will take them to what random source of information? There's no "official" meaning of what OOM is outside the kernel.... And anyway, why shouldn't the kernel tell what's happening? That printk is not exactly a fifty-page explanation, it just says "your system has run out of memory" instead of "OOM", which is what it's really happening and it's not verbose at all, and it doesn't scare users.

OOM doesn't prints just those messages, if prints a lot of "debugging info" about the state of the memory subsystem, I've found people in usenet who reboots their systems when they see that because they think it's a critical failure or something - and looking at how it's printed, I don't blame them. This is the reason why I submitted this patch.

(and I'd have added a "look at Documentation/oom.txt", but there's zero documentation of what OOM is, what are the causes of it, tips of how to find apps triggering it and tips to fix it, and I'm not the right person to write it, so...)

#3 lore raw
In reply to Matthias-Christian Ott
Quoted 17 lines · Matthias-Christian Ott
Quoted 15 lines · Diego Calleja

When people gets OOM messages, many of them don't know what is happening or what OOM means. This brief message explains it.

mm/oom_kill.c 2005-04-02 18:01:02.000000000 +0200 renamed from mm/oom_kill.c.orig 2005-04-02 17:44:14.000000000 +0200 +2 -1
@@ -189,7 +189,8 @@
        return;
    }
    task_unlock(p);
-    printk(KERN_ERR "Out of Memory: Killed process %d (%s).\n", 
 p->pid, p->comm);
+    printk(KERN_ERR "The system has run Out Of Memory (RAM + swap), 
 a process will be killed to free some memory\n");
+    printk(KERN_ERR "OOM: Killed process %d (%s).\n", p->pid, p->comm);
 
Quoted 11 lines
Quoted 10 lines

/*
* We give our sacrificial lamb high priority and access to
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

I disagree this is _not_ usefull. If the user don't knows what OOM means he can use google to get this information.

:) Somewhat like "Use your mobile phone to call helpdesk if your mobile phone is broken". Maybe such messages should have some kind of link to information in Documentation/ ?

regards,
Indrek