diff options
| author | Alexey Dobriyan <adobriyan@sw.ru> | 2007-10-17 02:30:26 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-17 11:43:01 -0400 |
| commit | 18796aa00243a594a2bd6733f1360aa38c3cd8f4 (patch) | |
| tree | 2a7ae5f90d87e4bd98f5de11bfe0ec4caed16e31 /include/linux | |
| parent | f7a75f0a40073601a0fb509290019d5f3f32b94b (diff) | |
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: Alexey Dobriyan <adobriyan@sw.ru>
Acked-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 884699fa8c1f..774cb435c7d8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
| @@ -918,6 +918,16 @@ struct task_struct { | |||
| 918 | #endif | 918 | #endif |
| 919 | 919 | ||
| 920 | unsigned short ioprio; | 920 | unsigned short ioprio; |
| 921 | /* | ||
| 922 | * fpu_counter contains the number of consecutive context switches | ||
| 923 | * that the FPU is used. If this is over a threshold, the lazy fpu | ||
| 924 | * saving becomes unlazy to save the trap. This is an unsigned char | ||
| 925 | * so that after 256 times the counter wraps and the behavior turns | ||
| 926 | * lazy again; this to deal with bursty apps that only use FPU for | ||
| 927 | * a short time | ||
| 928 | */ | ||
| 929 | unsigned char fpu_counter; | ||
| 930 | s8 oomkilladj; /* OOM kill score adjustment (bit shift). */ | ||
| 921 | #ifdef CONFIG_BLK_DEV_IO_TRACE | 931 | #ifdef CONFIG_BLK_DEV_IO_TRACE |
| 922 | unsigned int btrace_seq; | 932 | unsigned int btrace_seq; |
| 923 | #endif | 933 | #endif |
| @@ -1003,16 +1013,6 @@ struct task_struct { | |||
| 1003 | struct key *thread_keyring; /* keyring private to this thread */ | 1013 | struct key *thread_keyring; /* keyring private to this thread */ |
| 1004 | unsigned char jit_keyring; /* default keyring to attach requested keys to */ | 1014 | unsigned char jit_keyring; /* default keyring to attach requested keys to */ |
| 1005 | #endif | 1015 | #endif |
| 1006 | /* | ||
| 1007 | * fpu_counter contains the number of consecutive context switches | ||
| 1008 | * that the FPU is used. If this is over a threshold, the lazy fpu | ||
| 1009 | * saving becomes unlazy to save the trap. This is an unsigned char | ||
| 1010 | * so that after 256 times the counter wraps and the behavior turns | ||
| 1011 | * lazy again; this to deal with bursty apps that only use FPU for | ||
| 1012 | * a short time | ||
| 1013 | */ | ||
| 1014 | unsigned char fpu_counter; | ||
| 1015 | s8 oomkilladj; /* OOM kill score adjustment (bit shift). */ | ||
| 1016 | char comm[TASK_COMM_LEN]; /* executable name excluding path | 1016 | char comm[TASK_COMM_LEN]; /* executable name excluding path |
| 1017 | - access with [gs]et_task_comm (which lock | 1017 | - access with [gs]et_task_comm (which lock |
| 1018 | it with task_lock()) | 1018 | it with task_lock()) |
