diff options
| author | Nilay Shroff <nilay@linux.ibm.com> | 2026-07-13 17:24:16 +0530 |
|---|---|---|
| committer | Keith Busch <kbusch@kernel.org> | 2026-07-28 10:37:42 -0700 |
| commit | 1f3d29bdca645edd5a623639604328b8ec2193d6 (patch) | |
| tree | a42c4bdec1487af0982357f1fbcc0dc457b3a07d /tools/perf/scripts/python/bin | |
| parent | 50be6cb15f15006477332a20c4a4adba59a55163 (diff) | |
nvme: add context annotations for nvme_queue::sq_lock
nvme_queue::sq_tail, nvme_queue::last_sq_tail and nvme_queue::sq_cmds
are protected by nvme_queue::sq_lock. Annotate each field with
__guarded_by(&sq_lock) and annotate helpers that access them with
__must_hold(&sq_lock) so that Clang's context analysis can validate
the locking requirements.
Access to nvme_queue::sq_tail used solely for tracing is annotated with
data_race(), as they only require a lockless snapshot of the value.
nvme_init_queue() initializes nvme_queue::sq_tail and
nvme_queue::last_sq_tail before the queue is published and thus do not
require nvme_queue::sq_lock protection. So annotate nvme_init_queue()
with context_unsafe() to suppress false positive context analyzer
warning.
nvme_free_queue() operate on queues which are no longer reachable, and
therefore do not require nvme_queue::sq_lock protection. Similarly,
nvme_alloc_sq_cmds() allocates memory for nvme_queue::sq_cmds for the
queue which is not yet published or in use and hence it's safe to
annotate all these helpers using context_unsafe.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
