Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c7aceaba authored by Richard Kennedy's avatar Richard Kennedy Committed by Ingo Molnar
Browse files

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: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent 81d41d7e
Loading
Loading
Loading
Loading
+8 −8
Original line number Original line Diff line number Diff line
@@ -1021,6 +1021,7 @@ struct task_struct {
#endif
#endif


	int prio, static_prio, normal_prio;
	int prio, static_prio, normal_prio;
	unsigned int rt_priority;
	const struct sched_class *sched_class;
	const struct sched_class *sched_class;
	struct sched_entity se;
	struct sched_entity se;
	struct sched_rt_entity rt;
	struct sched_rt_entity rt;
@@ -1104,7 +1105,6 @@ struct task_struct {
	int __user *set_child_tid;		/* CLONE_CHILD_SETTID */
	int __user *set_child_tid;		/* CLONE_CHILD_SETTID */
	int __user *clear_child_tid;		/* CLONE_CHILD_CLEARTID */
	int __user *clear_child_tid;		/* CLONE_CHILD_CLEARTID */


	unsigned int rt_priority;
	cputime_t utime, stime, utimescaled, stimescaled;
	cputime_t utime, stime, utimescaled, stimescaled;
	cputime_t gtime;
	cputime_t gtime;
	cputime_t prev_utime, prev_stime;
	cputime_t prev_utime, prev_stime;
@@ -1123,12 +1123,12 @@ struct task_struct {
	gid_t gid,egid,sgid,fsgid;
	gid_t gid,egid,sgid,fsgid;
	struct group_info *group_info;
	struct group_info *group_info;
	kernel_cap_t   cap_effective, cap_inheritable, cap_permitted, cap_bset;
	kernel_cap_t   cap_effective, cap_inheritable, cap_permitted, cap_bset;
	unsigned securebits;
	struct user_struct *user;
	struct user_struct *user;
	unsigned securebits;
#ifdef CONFIG_KEYS
#ifdef CONFIG_KEYS
	unsigned char jit_keyring;	/* default keyring to attach requested keys to */
	struct key *request_key_auth;	/* assumed request_key authority */
	struct key *request_key_auth;	/* assumed request_key authority */
	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 */
#endif
#endif
	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
@@ -1215,8 +1215,8 @@ struct task_struct {
# define MAX_LOCK_DEPTH 48UL
# define MAX_LOCK_DEPTH 48UL
	u64 curr_chain_key;
	u64 curr_chain_key;
	int lockdep_depth;
	int lockdep_depth;
	struct held_lock held_locks[MAX_LOCK_DEPTH];
	unsigned int lockdep_recursion;
	unsigned int lockdep_recursion;
	struct held_lock held_locks[MAX_LOCK_DEPTH];
#endif
#endif


/* journalling filesystem info */
/* journalling filesystem info */
@@ -1244,10 +1244,6 @@ struct task_struct {
	u64 acct_vm_mem1;	/* accumulated virtual memory usage */
	u64 acct_vm_mem1;	/* accumulated virtual memory usage */
	cputime_t acct_stimexpd;/* stime since last update */
	cputime_t acct_stimexpd;/* stime since last update */
#endif
#endif
#ifdef CONFIG_NUMA
  	struct mempolicy *mempolicy;
	short il_next;
#endif
#ifdef CONFIG_CPUSETS
#ifdef CONFIG_CPUSETS
	nodemask_t mems_allowed;
	nodemask_t mems_allowed;
	int cpuset_mems_generation;
	int cpuset_mems_generation;
@@ -1266,6 +1262,10 @@ struct task_struct {
#endif
#endif
	struct list_head pi_state_list;
	struct list_head pi_state_list;
	struct futex_pi_state *pi_state_cache;
	struct futex_pi_state *pi_state_cache;
#endif
#ifdef CONFIG_NUMA
	struct mempolicy *mempolicy;
	short il_next;
#endif
#endif
	atomic_t fs_excl;	/* holding fs exclusive resources */
	atomic_t fs_excl;	/* holding fs exclusive resources */
	struct rcu_head rcu;
	struct rcu_head rcu;