Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150822195
D33810.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
964 B
Referenced Files
None
Subscribers
None
D33810.diff
View Options
diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c
--- a/sys/vm/vm_pageout.c
+++ b/sys/vm/vm_pageout.c
@@ -1902,6 +1902,7 @@
void
vm_pageout_oom(int shortage)
{
+ const char *reason;
struct proc *p, *bigproc;
vm_offset_t size, bigsize;
struct thread *td;
@@ -2014,11 +2015,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 = "a thread 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, Apr 5, 7:11 AM (18 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30873032
Default Alt Text
D33810.diff (964 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