diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-02-25 14:49:16 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2016-01-31 21:37:22 -0500 |
commit | 5edd1051f4f3bd7cddcc91e346fdd22eee639c72 (patch) | |
tree | d6381cf9877c6817d660d9f810b5369f5ec37cd0 /net | |
parent | 58f1369216367d27e047bead7221ff977431acaa (diff) | |
download | linux-5edd1051f4f3bd7cddcc91e346fdd22eee639c72.tar.bz2 |
SUNRPC: Reorder rpc_task to put waitqueue related info in same cachelines
Try to group all the data required by the waitqueues, their timers and timer
callbacks into the same cachelines for performance. With this reordering,
"pahole" reports the following structure on x86_64:
struct rpc_task {
atomic_t tk_count; /* 0 4 */
int tk_status; /* 4 4 */
struct list_head tk_task; /* 8 16 */
void (*tk_callback)(struct rpc_task *); /* 24
void (*tk_action)(struct rpc_task *); /* 32
long unsigned int tk_timeout; /* 40 8 */
long unsigned int tk_runstate; /* 48 8 */
struct rpc_wait_queue * tk_waitqueue; /* 56 8 */
/* --- cacheline 1 boundary (64 bytes) --- */
union {
struct work_struct tk_work; /* 64 */
struct rpc_wait tk_wait; /* 56 */
} u; /* 64 64 */
/* --- cacheline 2 boundary (128 bytes) --- */
struct rpc_message tk_msg; /* 128 32 */
void * tk_calldata; /* 160 8 */
const struct rpc_call_ops * tk_ops; /* 168 8 */
struct rpc_clnt * tk_client; /* 176 8 */
struct rpc_rqst * tk_rqstp; /* 184 8 */
/* --- cacheline 3 boundary (192 bytes) --- */
struct workqueue_struct * tk_workqueue; /* 192 8 */
ktime_t tk_start; /* 200 8 */
pid_t tk_owner; /* 208 4 */
short unsigned int tk_flags; /* 212 2 */
short unsigned int tk_timeouts; /* 214 2 */
short unsigned int tk_pid; /* 216 2 */
unsigned char tk_priority:2; /* 218: 6 1 */
unsigned char tk_garb_retry:2; /* 218: 4 1 */
unsigned char tk_cred_retry:2; /* 218: 2 1 */
unsigned char tk_rebind_retry:2; /* 218: 0 1 */
/* size: 224, cachelines: 4, members: 24 */
/* padding: 5 */
/* last cacheline: 32 bytes */
};
whereas on i386, it reports everything fitting into the 1st cacheline.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions