summaryrefslogtreecommitdiffstats
path: root/include/trace/events/oom.h
diff options
context:
space:
mode:
authorDavid Rientjes2012-12-12 01:02:54 +0100
committerLinus Torvalds2012-12-12 02:22:27 +0100
commita9c58b907dbc6821533dfc295b63caf111ff1f16 (patch)
treee50714c48de89400a02a8e92ef4e240c5206bbcc /include/trace/events/oom.h
parentmm: cleanup register_node() (diff)
downloadkernel-qcow2-linux-a9c58b907dbc6821533dfc295b63caf111ff1f16.tar.gz
kernel-qcow2-linux-a9c58b907dbc6821533dfc295b63caf111ff1f16.tar.xz
kernel-qcow2-linux-a9c58b907dbc6821533dfc295b63caf111ff1f16.zip
mm, oom: change type of oom_score_adj to short
The maximum oom_score_adj is 1000 and the minimum oom_score_adj is -1000, so this range can be represented by the signed short type with no functional change. The extra space this frees up in struct signal_struct will be used for per-thread oom kill flags in the next patch. Signed-off-by: David Rientjes <rientjes@google.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Cc: Anton Vorontsov <anton.vorontsov@linaro.org> Cc: Oleg Nesterov <oleg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/trace/events/oom.h')
-rw-r--r--include/trace/events/oom.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/trace/events/oom.h b/include/trace/events/oom.h
index dd4ba3b92002..1e974983757e 100644
--- a/include/trace/events/oom.h
+++ b/include/trace/events/oom.h
@@ -14,7 +14,7 @@ TRACE_EVENT(oom_score_adj_update,
TP_STRUCT__entry(
__field( pid_t, pid)
__array( char, comm, TASK_COMM_LEN )
- __field( int, oom_score_adj)
+ __field( short, oom_score_adj)
),
TP_fast_assign(
@@ -23,7 +23,7 @@ TRACE_EVENT(oom_score_adj_update,
__entry->oom_score_adj = task->signal->oom_score_adj;
),
- TP_printk("pid=%d comm=%s oom_score_adj=%d",
+ TP_printk("pid=%d comm=%s oom_score_adj=%hd",
__entry->pid, __entry->comm, __entry->oom_score_adj)
);