SUNRPC: receive buffer size estimation values almost never change
Avoid unnecessary cache sloshing by placing the buffer size estimation update logic behind an atomic bit flag. The size of GSS information included in each wrapped Reply does not change during the lifetime of a GSS context. Therefore, the au_rslack and au_ralign fields need to be updated only once after establishing a fresh GSS credential. Thus a slack size update must occur after a cred is created, duplicated, renewed, or expires. I'm not sure I have this exactly right. A trace point is introduced to track updates to these variables to enable troubleshooting the problem if I missed a spot. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
committed by
Anna Schumaker
parent
ef31d878b2
commit
53bc19f17f
@@ -291,6 +291,40 @@ TRACE_EVENT(rpcgss_need_reencode,
|
||||
__entry->ret ? "" : "un")
|
||||
);
|
||||
|
||||
TRACE_EVENT(rpcgss_update_slack,
|
||||
TP_PROTO(
|
||||
const struct rpc_task *task,
|
||||
const struct rpc_auth *auth
|
||||
),
|
||||
|
||||
TP_ARGS(task, auth),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field(unsigned int, task_id)
|
||||
__field(unsigned int, client_id)
|
||||
__field(u32, xid)
|
||||
__field(const void *, auth)
|
||||
__field(unsigned int, rslack)
|
||||
__field(unsigned int, ralign)
|
||||
__field(unsigned int, verfsize)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->task_id = task->tk_pid;
|
||||
__entry->client_id = task->tk_client->cl_clid;
|
||||
__entry->xid = be32_to_cpu(task->tk_rqstp->rq_xid);
|
||||
__entry->auth = auth;
|
||||
__entry->rslack = auth->au_rslack;
|
||||
__entry->ralign = auth->au_ralign;
|
||||
__entry->verfsize = auth->au_verfsize;
|
||||
),
|
||||
|
||||
TP_printk("task:%u@%u xid=0x%08x auth=%p rslack=%u ralign=%u verfsize=%u\n",
|
||||
__entry->task_id, __entry->client_id, __entry->xid,
|
||||
__entry->auth, __entry->rslack, __entry->ralign,
|
||||
__entry->verfsize)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(rpcgss_svc_seqno_class,
|
||||
TP_PROTO(
|
||||
__be32 xid,
|
||||
|
||||
Reference in New Issue
Block a user