aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorRichard Kennedy <richard@rsk.demon.co.uk>2008-05-15 07:09:15 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-06 09:19:35 -0400
commitc7aceaba042702538b23cf4e0de1b2891ad8e671 (patch)
treeaecf427f32aba870d7beed983e6e3917bb6aed6b /include/linux/sched.h
parent81d41d7ece23a1c3b4bcd1604026d3a06cc4dc79 (diff)
sched: reorder task_struct to reduce padding on 64bit builds
This patch removes 24 bytes of padding and allows 1 extra object per slab on my fedora based config. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index dc36c3aea018..ea2857b99596 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1021,6 +1021,7 @@ struct task_struct {
1021#endif 1021#endif
1022 1022
1023 int prio, static_prio, normal_prio; 1023 int prio, static_prio, normal_prio;
1024 unsigned int rt_priority;
1024 const struct sched_class *sched_class; 1025 const struct sched_class *sched_class;
1025 struct sched_entity se; 1026 struct sched_entity se;
1026 struct sched_rt_entity rt; 1027 struct sched_rt_entity rt;
@@ -1104,7 +1105,6 @@ struct task_struct {
1104 int __user *set_child_tid; /* CLONE_CHILD_SETTID */ 1105 int __user *set_child_tid; /* CLONE_CHILD_SETTID */
1105 int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */ 1106 int __user *clear_child_tid; /* CLONE_CHILD_CLEARTID */
1106 1107
1107 unsigned int rt_priority;
1108 cputime_t utime, stime, utimescaled, stimescaled; 1108 cputime_t utime, stime, utimescaled, stimescaled;
1109 cputime_t gtime; 1109 cputime_t gtime;
1110 cputime_t prev_utime, prev_stime; 1110 cputime_t prev_utime, prev_stime;
@@ -1123,12 +1123,12 @@ struct task_struct {
1123 gid_t gid,egid,sgid,fsgid; 1123 gid_t gid,egid,sgid,fsgid;
1124 struct group_info *group_info; 1124 struct group_info *group_info;
1125 kernel_cap_t cap_effective, cap_inheritable, cap_permitted, cap_bset; 1125 kernel_cap_t cap_effective, cap_inheritable, cap_permitted, cap_bset;
1126 unsigned securebits;
1127 struct user_struct *user; 1126 struct user_struct *user;
1127 unsigned securebits;
1128#ifdef CONFIG_KEYS 1128#ifdef CONFIG_KEYS
1129 unsigned char jit_keyring; /* default keyring to attach requested keys to */
1129 struct key *request_key_auth; /* assumed request_key authority */ 1130 struct key *request_key_auth; /* assumed request_key authority */
1130 struct key *thread_keyring; /* keyring private to this thread */ 1131 struct key *thread_keyring; /* keyring private to this thread */
1131 unsigned char jit_keyring; /* default keyring to attach requested keys to */
1132#endif 1132#endif
1133 char comm[TASK_COMM_LEN]; /* executable name excluding path 1133 char comm[TASK_COMM_LEN]; /* executable name excluding path
1134 - access with [gs]et_task_comm (which lock 1134 - access with [gs]et_task_comm (which lock
@@ -1215,8 +1215,8 @@ struct task_struct {
1215# define MAX_LOCK_DEPTH 48UL 1215# define MAX_LOCK_DEPTH 48UL
1216 u64 curr_chain_key; 1216 u64 curr_chain_key;
1217 int lockdep_depth; 1217 int lockdep_depth;
1218 struct held_lock held_locks[MAX_LOCK_DEPTH];
1219 unsigned int lockdep_recursion; 1218 unsigned int lockdep_recursion;
1219 struct held_lock held_locks[MAX_LOCK_DEPTH];
1220#endif 1220#endif
1221 1221
1222/* journalling filesystem info */ 1222/* journalling filesystem info */
@@ -1244,10 +1244,6 @@ struct task_struct {
1244 u64 acct_vm_mem1; /* accumulated virtual memory usage */ 1244 u64 acct_vm_mem1; /* accumulated virtual memory usage */
1245 cputime_t acct_stimexpd;/* stime since last update */ 1245 cputime_t acct_stimexpd;/* stime since last update */
1246#endif 1246#endif
1247#ifdef CONFIG_NUMA
1248 struct mempolicy *mempolicy;
1249 short il_next;
1250#endif
1251#ifdef CONFIG_CPUSETS 1247#ifdef CONFIG_CPUSETS
1252 nodemask_t mems_allowed; 1248 nodemask_t mems_allowed;
1253 int cpuset_mems_generation; 1249 int cpuset_mems_generation;
@@ -1267,6 +1263,10 @@ struct task_struct {
1267 struct list_head pi_state_list; 1263 struct list_head pi_state_list;
1268 struct futex_pi_state *pi_state_cache; 1264 struct futex_pi_state *pi_state_cache;
1269#endif 1265#endif
1266#ifdef CONFIG_NUMA
1267 struct mempolicy *mempolicy;
1268 short il_next;
1269#endif
1270 atomic_t fs_excl; /* holding fs exclusive resources */ 1270 atomic_t fs_excl; /* holding fs exclusive resources */
1271 struct rcu_head rcu; 1271 struct rcu_head rcu;
1272 1272