aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/oom.h4
-rw-r--r--include/linux/sched.h6
-rw-r--r--include/trace/events/oom.h4
-rw-r--r--include/trace/events/task.h8
4 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/oom.h b/include/linux/oom.h
index 4a4188da4570..922dab164eb0 100644
--- a/include/linux/oom.h
+++ b/include/linux/oom.h
@@ -29,8 +29,8 @@ enum oom_scan_t {
29 OOM_SCAN_SELECT, /* always select this thread first */ 29 OOM_SCAN_SELECT, /* always select this thread first */
30}; 30};
31 31
32extern void compare_swap_oom_score_adj(int old_val, int new_val); 32extern void compare_swap_oom_score_adj(short old_val, short new_val);
33extern int test_set_oom_score_adj(int new_val); 33extern short test_set_oom_score_adj(short new_val);
34 34
35extern unsigned long oom_badness(struct task_struct *p, 35extern unsigned long oom_badness(struct task_struct *p,
36 struct mem_cgroup *memcg, const nodemask_t *nodemask, 36 struct mem_cgroup *memcg, const nodemask_t *nodemask,
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 0dd42a02df2e..ed30456152da 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -631,9 +631,9 @@ struct signal_struct {
631 struct rw_semaphore group_rwsem; 631 struct rw_semaphore group_rwsem;
632#endif 632#endif
633 633
634 int oom_score_adj; /* OOM kill score adjustment */ 634 short oom_score_adj; /* OOM kill score adjustment */
635 int oom_score_adj_min; /* OOM kill score adjustment minimum value. 635 short oom_score_adj_min; /* OOM kill score adjustment min value.
636 * Only settable by CAP_SYS_RESOURCE. */ 636 * Only settable by CAP_SYS_RESOURCE. */
637 637
638 struct mutex cred_guard_mutex; /* guard against foreign influences on 638 struct mutex cred_guard_mutex; /* guard against foreign influences on
639 * credential calculations 639 * credential calculations
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,
14 TP_STRUCT__entry( 14 TP_STRUCT__entry(
15 __field( pid_t, pid) 15 __field( pid_t, pid)
16 __array( char, comm, TASK_COMM_LEN ) 16 __array( char, comm, TASK_COMM_LEN )
17 __field( int, oom_score_adj) 17 __field( short, oom_score_adj)
18 ), 18 ),
19 19
20 TP_fast_assign( 20 TP_fast_assign(
@@ -23,7 +23,7 @@ TRACE_EVENT(oom_score_adj_update,
23 __entry->oom_score_adj = task->signal->oom_score_adj; 23 __entry->oom_score_adj = task->signal->oom_score_adj;
24 ), 24 ),
25 25
26 TP_printk("pid=%d comm=%s oom_score_adj=%d", 26 TP_printk("pid=%d comm=%s oom_score_adj=%hd",
27 __entry->pid, __entry->comm, __entry->oom_score_adj) 27 __entry->pid, __entry->comm, __entry->oom_score_adj)
28); 28);
29 29
diff --git a/include/trace/events/task.h b/include/trace/events/task.h
index b53add02e929..102a646e1996 100644
--- a/include/trace/events/task.h
+++ b/include/trace/events/task.h
@@ -15,7 +15,7 @@ TRACE_EVENT(task_newtask,
15 __field( pid_t, pid) 15 __field( pid_t, pid)
16 __array( char, comm, TASK_COMM_LEN) 16 __array( char, comm, TASK_COMM_LEN)
17 __field( unsigned long, clone_flags) 17 __field( unsigned long, clone_flags)
18 __field( int, oom_score_adj) 18 __field( short, oom_score_adj)
19 ), 19 ),
20 20
21 TP_fast_assign( 21 TP_fast_assign(
@@ -25,7 +25,7 @@ TRACE_EVENT(task_newtask,
25 __entry->oom_score_adj = task->signal->oom_score_adj; 25 __entry->oom_score_adj = task->signal->oom_score_adj;
26 ), 26 ),
27 27
28 TP_printk("pid=%d comm=%s clone_flags=%lx oom_score_adj=%d", 28 TP_printk("pid=%d comm=%s clone_flags=%lx oom_score_adj=%hd",
29 __entry->pid, __entry->comm, 29 __entry->pid, __entry->comm,
30 __entry->clone_flags, __entry->oom_score_adj) 30 __entry->clone_flags, __entry->oom_score_adj)
31); 31);
@@ -40,7 +40,7 @@ TRACE_EVENT(task_rename,
40 __field( pid_t, pid) 40 __field( pid_t, pid)
41 __array( char, oldcomm, TASK_COMM_LEN) 41 __array( char, oldcomm, TASK_COMM_LEN)
42 __array( char, newcomm, TASK_COMM_LEN) 42 __array( char, newcomm, TASK_COMM_LEN)
43 __field( int, oom_score_adj) 43 __field( short, oom_score_adj)
44 ), 44 ),
45 45
46 TP_fast_assign( 46 TP_fast_assign(
@@ -50,7 +50,7 @@ TRACE_EVENT(task_rename,
50 __entry->oom_score_adj = task->signal->oom_score_adj; 50 __entry->oom_score_adj = task->signal->oom_score_adj;
51 ), 51 ),
52 52
53 TP_printk("pid=%d oldcomm=%s newcomm=%s oom_score_adj=%d", 53 TP_printk("pid=%d oldcomm=%s newcomm=%s oom_score_adj=%hd",
54 __entry->pid, __entry->oldcomm, 54 __entry->pid, __entry->oldcomm,
55 __entry->newcomm, __entry->oom_score_adj) 55 __entry->newcomm, __entry->oom_score_adj)
56); 56);