int sysctl_oom_kill_allocating_task;
int sysctl_oom_dump_tasks;
static DEFINE_SPINLOCK(zone_scan_mutex);
-/* #define DEBUG */
+#define DEBUG
/**
* badness - calculate a numeric value for how bad this task has been
}
#ifdef DEBUG
- printk(KERN_DEBUG "OOMkill: task %d (%s) got %lu points\n",
+ printk(KERN_INFO "OOMkill: task %d (%s) got %lu points\n",
p->pid, p->comm, points);
#endif
return points;
{
unsigned long points = 0;
struct task_struct *p;
+ int orig_log_level;
cgroup_lock();
read_lock(&tasklist_lock);
unsigned long points = 0;
unsigned long freed = 0;
enum oom_constraint constraint;
+ int orig_log_level;
blocking_notifier_call_chain(&oom_notify_list, 0, &freed);
if (freed > 0)
/* Got some memory back in the last second. */
return;
+ orig_log_level = console_loglevel;
+ console_loglevel = 7;
+
if (sysctl_panic_on_oom == 2)
panic("out of memory. Compulsory panic_on_oom is selected.\n");
+ console_loglevel = orig_log_level;
+
/*
* Check if there were limitations on the allocation (only relevant for
* NUMA) that may require different handling.