diff options
| author | Qiliang Yuan <odys.yuan@gmail.com> | 2026-11-04 01:31:28 -0500 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-11-04 07:51:11 -0800 |
| commit | 1ac7efbea82562f4b1eded4de7cb37540061fb05 (patch) | |
| tree | d67396d23732841ec62b010e16ba7eda144fcc4c /tools/perf/scripts/python | |
| parent | 404a8f6caa63822c1d2a45adbf07fd9c0567a7ef (diff) | |
nvmet: drop the extra RCU grace period in nvmet_ns_disable()
nvmet_ns_disable() kills the namespace's percpu ref, waits in
synchronize_rcu() for anyone looking the namespace up under
rcu_read_lock(), and then waits for the ref to drop to zero.
Killing a percpu ref that is still in percpu mode, as the namespace
ref always is until then, switches it to atomic mode from an RCU
callback, so the ref can't drop to zero before a grace period has
passed since the kill. synchronize_rcu() thus adds a second grace
period in a row, about 4 ms here, and disabling the namespaces of a
subsystem one by one takes about 9 ms each.
Drop synchronize_rcu() and rely on the wait for the ref to cover the
RCU readers as well.
Disabling 64 namespaces through configfs, median of 3 runs on each of
two boots per kernel:
host connected before after
none 588 / 590 ms 409 / 409 ms
nvme-tcp 617 / 619 ms 542 / 511 ms
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Qiliang Yuan <odys.yuan@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
