diff options
author | Dai Ngo <dai.ngo@oracle.com> | 2024-11-19 13:43:22 -0800 |
---|---|---|
committer | Anna Schumaker <anna.schumaker@oracle.com> | 2025-01-13 13:27:25 -0500 |
commit | e0537c9f828dc9500e5ffc9211099c495b72f402 (patch) | |
tree | fcacb952e8bc17bdfa07d882a344d1dd4282f637 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 5bc55a333a2f7316b58edc7573e8e893f7acb532 (diff) |
SUNRPC: only put task on cl_tasks list after the RPC call slot is reserved.
Under heavy write load, we've seen the cl_tasks list grows to
millions of entries. Even though the list is extremely long,
the system still runs fine until the user wants to get the
information of all active RPC tasks by doing:
When this happens, tasks_start acquires the cl_lock to walk the
cl_tasks list, returning one entry at a time to the caller. The
cl_lock is held until all tasks on this list have been processed.
While the cl_lock is held, completed RPC tasks have to spin wait
in rpc_task_release_client for the cl_lock. If there are millions
of entries in the cl_tasks list it will take a long time before
tasks_stop is called and the cl_lock is released.
The spin wait tasks can use up all the available CPUs in the system,
preventing other jobs to run, this causes the system to temporarily
lock up.
This patch fixes this problem by delaying inserting the RPC
task on the cl_tasks list until the RPC call slot is reserved.
This limits the length of the cl_tasks to the number of call
slots available in the system.
Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions