Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 292617
b: refs/heads/master
c: dc3f21e
h: refs/heads/master
i:
  292615: 4b5ac79
v: v3
  • Loading branch information
David Rientjes authored and Linus Torvalds committed Mar 22, 2012
1 parent f7cbc39 commit a6675a1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8447d950e7445cae71ad66d0e33784f8388aaf9d
refs/heads/master: dc3f21eadeea6d9898271ff32d35d5e00c6872ea
5 changes: 4 additions & 1 deletion trunk/mm/oom_kill.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <linux/ptrace.h>
#include <linux/freezer.h>
#include <linux/ftrace.h>
#include <linux/ratelimit.h>

#define CREATE_TRACE_POINTS
#include <trace/events/oom.h>
Expand Down Expand Up @@ -444,6 +445,8 @@ static void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
struct task_struct *t = p;
struct mm_struct *mm;
unsigned int victim_points = 0;
static DEFINE_RATELIMIT_STATE(oom_rs, DEFAULT_RATELIMIT_INTERVAL,
DEFAULT_RATELIMIT_BURST);

/*
* If the task is already exiting, don't alarm the sysadmin or kill
Expand All @@ -454,7 +457,7 @@ static void oom_kill_process(struct task_struct *p, gfp_t gfp_mask, int order,
return;
}

if (printk_ratelimit())
if (__ratelimit(&oom_rs))
dump_header(p, gfp_mask, order, memcg, nodemask);

task_lock(p);
Expand Down

0 comments on commit a6675a1

Please sign in to comment.