Commit 18796aa0 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Linus Torvalds

task_struct: move ->fpu_counter and ->oomkilladj

There is nice 2 byte hole after struct task_struct::ioprio field
into which we can put two 1-byte fields: ->fpu_counter and ->oomkilladj.
Signed-off-by: default avatarAlexey Dobriyan <adobriyan@sw.ru>
Acked-by: default avatarArjan van de Ven <arjan@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f7a75f0a
...@@ -918,6 +918,16 @@ struct task_struct { ...@@ -918,6 +918,16 @@ struct task_struct {
#endif #endif
unsigned short ioprio; unsigned short ioprio;
/*
* fpu_counter contains the number of consecutive context switches
* that the FPU is used. If this is over a threshold, the lazy fpu
* saving becomes unlazy to save the trap. This is an unsigned char
* so that after 256 times the counter wraps and the behavior turns
* lazy again; this to deal with bursty apps that only use FPU for
* a short time
*/
unsigned char fpu_counter;
s8 oomkilladj; /* OOM kill score adjustment (bit shift). */
#ifdef CONFIG_BLK_DEV_IO_TRACE #ifdef CONFIG_BLK_DEV_IO_TRACE
unsigned int btrace_seq; unsigned int btrace_seq;
#endif #endif
...@@ -1003,16 +1013,6 @@ struct task_struct { ...@@ -1003,16 +1013,6 @@ struct task_struct {
struct key *thread_keyring; /* keyring private to this thread */ struct key *thread_keyring; /* keyring private to this thread */
unsigned char jit_keyring; /* default keyring to attach requested keys to */ unsigned char jit_keyring; /* default keyring to attach requested keys to */
#endif #endif
/*
* fpu_counter contains the number of consecutive context switches
* that the FPU is used. If this is over a threshold, the lazy fpu
* saving becomes unlazy to save the trap. This is an unsigned char
* so that after 256 times the counter wraps and the behavior turns
* lazy again; this to deal with bursty apps that only use FPU for
* a short time
*/
unsigned char fpu_counter;
s8 oomkilladj; /* OOM kill score adjustment (bit shift). */
char comm[TASK_COMM_LEN]; /* executable name excluding path char comm[TASK_COMM_LEN]; /* executable name excluding path
- access with [gs]et_task_comm (which lock - access with [gs]et_task_comm (which lock
it with task_lock()) it with task_lock())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment