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

Commit 9bb0b813 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

SUNRPC: Reorder the struct rpc_task fields



This improves the packing of the rpc_task, and ensures that on 64-bit
platforms the size reduces to 216 bytes.

Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent d72b6cec
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -45,14 +45,11 @@ struct rpc_task {
	struct list_head	tk_task;	/* global list of tasks */
	struct list_head	tk_task;	/* global list of tasks */
	struct rpc_clnt *	tk_client;	/* RPC client */
	struct rpc_clnt *	tk_client;	/* RPC client */
	struct rpc_rqst *	tk_rqstp;	/* RPC request */
	struct rpc_rqst *	tk_rqstp;	/* RPC request */
	int			tk_status;	/* result of last operation */


	/*
	/*
	 * RPC call state
	 * RPC call state
	 */
	 */
	struct rpc_message	tk_msg;		/* RPC call info */
	struct rpc_message	tk_msg;		/* RPC call info */
	__u8			tk_garb_retry;
	__u8			tk_cred_retry;


	/*
	/*
	 * callback	to be executed after waking up
	 * callback	to be executed after waking up
@@ -65,7 +62,6 @@ struct rpc_task {
	void *			tk_calldata;
	void *			tk_calldata;


	unsigned long		tk_timeout;	/* timeout for rpc_sleep() */
	unsigned long		tk_timeout;	/* timeout for rpc_sleep() */
	unsigned short		tk_flags;	/* misc flags */
	unsigned long		tk_runstate;	/* Task run status */
	unsigned long		tk_runstate;	/* Task run status */
	struct workqueue_struct	*tk_workqueue;	/* Normally rpciod, but could
	struct workqueue_struct	*tk_workqueue;	/* Normally rpciod, but could
						 * be any workqueue
						 * be any workqueue
@@ -76,15 +72,19 @@ struct rpc_task {
		struct rpc_wait		tk_wait;	/* RPC wait */
		struct rpc_wait		tk_wait;	/* RPC wait */
	} u;
	} u;


	unsigned short		tk_timeouts;	/* maj timeouts */
	ktime_t			tk_start;	/* RPC task init timestamp */
	ktime_t			tk_start;	/* RPC task init timestamp */


	pid_t			tk_owner;	/* Process id for batching tasks */
	pid_t			tk_owner;	/* Process id for batching tasks */
	unsigned char		tk_priority : 2;/* Task priority */
	int			tk_status;	/* result of last operation */
	unsigned short		tk_flags;	/* misc flags */
	unsigned short		tk_timeouts;	/* maj timeouts */


#ifdef RPC_DEBUG
#ifdef RPC_DEBUG
	unsigned short		tk_pid;		/* debugging aid */
	unsigned short		tk_pid;		/* debugging aid */
#endif
#endif
	unsigned char		tk_priority : 2,/* Task priority */
				tk_garb_retry : 2,
				tk_cred_retry : 2;
};
};
#define tk_xprt			tk_client->cl_xprt
#define tk_xprt			tk_client->cl_xprt