30 Dec, 2020
1 commit
-
[ Upstream commit e4c72201b6ec3173dfe13fa2e2335a3ad78d4921 ]
Currently, we wake up the tasks by priority queue ordering, which means
that we ignore the batching that is supposed to help with QoS issues.Fixes: c049f8ea9a0d ("SUNRPC: Remove the bh-safe lock requirement on the rpc_wait_queue->lock")
Signed-off-by: Trond Myklebust
Signed-off-by: Sasha Levin
21 Sep, 2020
5 commits
-
Clean up.
Signed-off-by: Chuck Lever
Signed-off-by: Anna Schumaker -
Remove redundant call sites or call sites that are already covered
by tracepoints.Signed-off-by: Chuck Lever
Signed-off-by: Anna Schumaker -
Remove several redundant dprintk call sites, and replace a couple of
potentially useful ones with tracepoints.Signed-off-by: Chuck Lever
Signed-off-by: Anna Schumaker -
These instruments don't appear to add any substantial value.
We already have this at the termination of each RPC:
iozone-2617 [002] 975.713126: rpc_stats_latency: task:418@5 xid=0x260eab5d nfsv3 LOOKUP backlog=15 rtt=32 execute=58
iozone-2617 [002] 975.713127: xprt_release_cong: task:418@5 snd_task:4294967295 cong=256 cwnd=16384
iozone-2617 [002] 975.713127: xprt_put_cong: task:418@5 snd_task:4294967295 cong=0 cwnd=16384Signed-off-by: Chuck Lever
Signed-off-by: Anna Schumaker -
Introduce a tracepoint in call_allocate that reports the exact
sizes in the RPC buffer allocation request and the status of the
result. This helps catch problems with XDR buffer provisioning,
and replaces transport-specific debugging instrumentation.Signed-off-by: Chuck Lever
Signed-off-by: Anna Schumaker
05 Apr, 2020
1 commit
-
Move the test for whether a task is already queued to prevent
corruption of the timer list in __rpc_sleep_on_priority_timeout().Signed-off-by: Trond Myklebust
16 Mar, 2020
1 commit
-
Add a flag to signal to the RPC layer that the credential is already
pinned for the duration of the RPC call.Signed-off-by: Trond Myklebust
15 Jan, 2020
1 commit
-
Signed-off-by: Chuck Lever
Signed-off-by: Anna Schumaker
23 Nov, 2019
1 commit
-
RPC tasks on the backchannel never invoke xprt_complete_rqst(), so
there is no way to report their tk_status at completion. Also, any
RPC task that exits via rpc_exit_task() before it is replied to will
also disappear without a trace.Introduce a trace point that is symmetrical with rpc_task_begin that
captures the termination status of each RPC task.Sample trace output for callback requests initiated on the server:
kworker/u8:12-448 [003] 127.025240: rpc_task_end: task:50@3 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpc_exit_task
kworker/u8:12-448 [002] 127.567310: rpc_task_end: task:51@3 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpc_exit_task
kworker/u8:12-448 [001] 130.506817: rpc_task_end: task:52@3 flags=ASYNC|DYNAMIC|SOFT|SOFTCONN|SENT runstate=RUNNING|ACTIVE status=0 action=rpc_exit_taskOdd, though, that I never see trace_rpc_task_complete, either in the
forward or backchannel. Should it be removed?Signed-off-by: Chuck Lever
Signed-off-by: Trond Myklebust
06 Nov, 2019
1 commit
-
Jon Hunter: "I have been tracking down another suspend/NFS related
issue where again I am seeing random delays exiting suspend. The delays
can be up to a couple minutes in the worst case and this is causing a
suspend test we have to fail."Change the use of a deferrable work to a standard delayed one.
Reported-by: Jon Hunter
Tested-by: Jon Hunter
Fixes: 7e0a0e38fcfea ("SUNRPC: Replace the queue timer with a delayed work function")
Signed-off-by: Trond Myklebust
18 Sep, 2019
1 commit
-
Ensure that we set task->tk_rpc_status for all RPC level errors so that
the caller can distinguish between those and server reply status errors.Signed-off-by: Trond Myklebust
Signed-off-by: Anna Schumaker
20 Aug, 2019
1 commit
-
Clean up: commit c544577daddb ("SUNRPC: Clean up transport write
space handling") appears to have removed the last caller of
rpc_wake_up_queued_task_on_wq().Signed-off-by: Chuck Lever
Signed-off-by: Anna Schumaker
13 Jul, 2019
2 commits
-
Ensure that we do the required accounting for the round robin queue
when the caller to rpc_init_task() has passed in a transport to be
used.Reported-by: Olga Kornievskaia
Reported-by: Neil Brown
Signed-off-by: Trond Myklebust -
NFSoRDMA client updates for 5.3
New features:
- Add a way to place MRs back on the free list
- Reduce context switching
- Add new trace eventsBugfixes and cleanups:
- Fix a BUG when tracing is enabled with NFSv4.1
- Fix a use-after-free in rpcrdma_post_recvs
- Replace use of xdr_stream_pos in rpcrdma_marshal_req
- Fix occasional transport deadlock
- Fix show_nfs_errors macros, other tracing improvements
- Remove RPCRDMA_REQ_F_PENDING and fr_state
- Various simplifications and refactors
09 Jul, 2019
1 commit
-
Adapt and apply changes that were made to the TCP socket connect
code. See the following commits for details on the purpose of
these changes:Commit 7196dbb02ea0 ("SUNRPC: Allow changing of the TCP timeout parameters on the fly")
Commit 3851f1cdb2b8 ("SUNRPC: Limit the reconnect backoff timer to the max RPC message timeout")
Commit 02910177aede ("SUNRPC: Fix reconnection timeouts")Some common transport code is moved to xprt.c to satisfy the code
duplication police.Signed-off-by: Chuck Lever
Signed-off-by: Anna Schumaker
07 Jul, 2019
4 commits
-
For diagnostic purposes, it would be useful to have an rpc_iostats
metric of RPCs completing with tk_status < 0. Unfortunately,
tk_status is reset inside the rpc_call_done functions for each
operation, and the call to tally the per-op metrics comes after
rpc_call_done. Refactor the call to rpc_count_iostat earlier in
rpc_exit_task so we can count these RPCs completing in error.Signed-off-by: Dave Wysochanski
Signed-off-by: Trond Myklebust -
Signed-off-by: Trond Myklebust
-
The queue timer function, which walks the RPC queue in order to locate
candidates for waking up is one of the current constraints against
removing the bh-safe queue spin locks. Replace it with a delayed
work queue, so that we can do the actual rpc task wake ups from an
ordinary process context.Signed-off-by: Trond Myklebust
22 Jun, 2019
1 commit
-
Jon Hunter reports:
"I have been noticing intermittent failures with a system suspend test on
some of our machines that have a NFS mounted root file-system. Bisecting
this issue points to your commit 431235818bc3 ("SUNRPC: Declare RPC
timers as TIMER_DEFERRABLE") and reverting this on top of v5.2-rc3 does
appear to resolve the problem.The cause of the suspend failure appears to be a long delay observed
sometimes when resuming from suspend, and this is causing our test to
timeout."This reverts commit 431235818bc3a919ca7487500c67c3144feece80.
Reported-by: Jon Hunter
Signed-off-by: Anna Schumaker
21 May, 2019
1 commit
-
Add SPDX license identifiers to all files which:
- Have no license information of any form
- Have EXPORT_.*_SYMBOL_GPL inside which was used in the
initial scan/conversion to ignore the fileThese files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:GPL-2.0-only
Signed-off-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
26 Apr, 2019
7 commits
-
Don't wake idle CPUs only for the purpose of servicing an RPC
queue timeout.Signed-off-by: Trond Myklebust
Signed-off-by: Anna Schumaker -
Simplify the setting of queue timeouts by using the timer_reduce()
function.Signed-off-by: Trond Myklebust
Signed-off-by: Anna Schumaker -
Add a helper to ensure that debugfs and friends print out the
correct current task timeout value.Signed-off-by: Trond Myklebust
Signed-off-by: Anna Schumaker -
Clean up the RPC task sleep interfaces by replacing the task->tk_timeout
'hidden parameter' to rpc_sleep_on() with a new function that takes an
absolute timeout.Signed-off-by: Trond Myklebust
Signed-off-by: Anna Schumaker -
None of the callers set the 'action' argument, so let's just remove it.
Signed-off-by: Trond Myklebust
Signed-off-by: Anna Schumaker -
rpc_sleep_on() does not need to set the task->tk_callback under the
queue lock, so move that out.
Also refactor the check for whether the task is active.Signed-off-by: Trond Myklebust
Signed-off-by: Anna Schumaker -
The RPC_TASK_KILLED flag should really not be set from another context
because it can clobber data in the struct task when task->tk_flags is
changed non-atomically.
Let's therefore swap out RPC_TASK_KILLED with an atomic flag, and add
a function to set that flag and safely wake up the task.Signed-off-by: Trond Myklebust
Signed-off-by: Anna Schumaker
10 Mar, 2019
1 commit
-
The RPC task wakeup calls all check for RPC_IS_QUEUED() before taking any
locks. In addition, rpc_exit() already calls rpc_wake_up_queued_task().Signed-off-by: Trond Myklebust
03 Mar, 2019
1 commit
-
Convert the remaining gfp_flags arguments in sunrpc to standard reclaiming
allocations, now that we set memalloc_nofs_save() as appropriate.Signed-off-by: Trond Myklebust
21 Feb, 2019
1 commit
-
Set memalloc_nofs_save() on all the rpciod/xprtiod jobs so that we
ensure memory allocations for asynchronous rpc calls don't ever end
up recursing back to the NFS layer for memory reclaim.Signed-off-by: Trond Myklebust
20 Dec, 2018
2 commits
-
SUNRPC has two sorts of credentials, both of which appear as
"struct rpc_cred".
There are "generic credentials" which are supplied by clients
such as NFS and passed in 'struct rpc_message' to indicate
which user should be used to authorize the request, and there
are low-level credentials such as AUTH_NULL, AUTH_UNIX, AUTH_GSS
which describe the credential to be sent over the wires.This patch replaces all the generic credentials by 'struct cred'
pointers - the credential structure used throughout Linux.For machine credentials, there is a special 'struct cred *' pointer
which is statically allocated and recognized where needed as
having a special meaning. A look-up of a low-level cred will
map this to a machine credential.Signed-off-by: NeilBrown
Acked-by: J. Bruce Fields
Signed-off-by: Anna Schumaker -
The credential passed in rpc_message.rpc_cred is always a
generic credential except in one instance.
When gss_destroying_context() calls rpc_call_null(), it passes
a specific credential that it needs to destroy.
In this case the RPC acts *on* the credential rather than
being authorized by it.This special case deserves explicit support and providing that will
mean that rpc_message.rpc_cred is *always* generic, allowing
some optimizations.So add "tk_op_cred" to rpc_task and "rpc_op_cred" to the setup data.
Use this to pass the cred down from rpc_call_null(), and have
rpcauth_bindcred() notice it and bind it in place.Credit to kernel test robot for finding
a bug in earlier version of this patch.Signed-off-by: NeilBrown
Signed-off-by: Anna Schumaker
01 Oct, 2018
3 commits
-
Fix up the priority queue to not batch by owner, but by queue, so that
we allow '1 << priority' elements to be dequeued before switching to
the next priority queue.
The owner field is still used to wake up requests in round robin order
by owner to avoid single processes hogging the RPC layer by loading the
queues.Signed-off-by: Trond Myklebust
-
When asked to wake up an RPC task, it makes sense to test whether or not
the task is still queued.Signed-off-by: Trond Myklebust
-
Add a helper that will wake up a task that is sleeping on a specific
queue, and will set the value of task->tk_status. This is mainly
intended for use by the transport layer to notify the task of an
error condition.Signed-off-by: Trond Myklebust
11 Apr, 2018
1 commit
-
Clean up: struct rpc_task carries a pointer to a struct rpc_clnt,
and in fact task->tk_client is always what is passed into trace
points that are already passing @task.Signed-off-by: Chuck Lever
Signed-off-by: Anna Schumaker
09 Feb, 2018
1 commit
-
Hi folks,
On a multi-core machine, is it expected that we can have parallel RPCs
handled by each of the per-core workqueue?In testing a read workload, observing via "top" command that a single
"kworker" thread is running servicing the requests (no parallelism).
It's more prominent while doing these operations over krb5p mount.What has been suggested by Bruce is to try this and in my testing I
see then the read workload spread among all the kworker threads.Signed-off-by: Olga Kornievskaia
Signed-off-by: Trond Myklebust
08 Feb, 2018
1 commit
-
This should help reduce the latency on replies.
Signed-off-by: Trond Myklebust