Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144964313
D33810.id101212.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
990 B
Referenced Files
None
Subscribers
None
D33810.id101212.diff
View Options
Index: sys/vm/vm_pageout.c
===================================================================
--- sys/vm/vm_pageout.c
+++ sys/vm/vm_pageout.c
@@ -1901,6 +1901,7 @@
void
vm_pageout_oom(int shortage)
{
+ const char *reason;
struct proc *p, *bigproc;
vm_offset_t size, bigsize;
struct thread *td;
@@ -2013,11 +2014,25 @@
}
}
sx_sunlock(&allproc_lock);
+
if (bigproc != NULL) {
+ switch (shortage) {
+ case VM_OOM_MEM:
+ reason = "failed to reclaim memory";
+ break;
+ case VM_OOM_MEM_PF:
+ reason = "waited too long to allocate a page";
+ break;
+ case VM_OOM_SWAPZ:
+ reason = "out of swap space";
+ break;
+ default:
+ panic("unknown OOM reason %d", shortage);
+ }
if (vm_panic_on_oom != 0 && --vm_panic_on_oom == 0)
- panic("out of swap space");
+ panic("%s", reason);
PROC_LOCK(bigproc);
- killproc(bigproc, "out of swap space");
+ killproc(bigproc, reason);
sched_nice(bigproc, PRIO_MIN);
_PRELE(bigproc);
PROC_UNLOCK(bigproc);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 15, 1:35 PM (2 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28743199
Default Alt Text
D33810.id101212.diff (990 B)
Attached To
Mode
D33810: vm_pageout: Print a more accurate message to the console before an OOM kill
Attached
Detach File
Event Timeline
Log In to Comment