On 10/23/24 12:59 AM, Ming Lei wrote:
On Tue, Oct 22, 2024 at 08:05:32AM -0700, Bart Van Assche wrote:
On 10/17/24 6:35 PM, Ming Lei wrote:
-> #1 (q->q_usage_counter){++++}-{0:0}:
What code in the upstream kernel associates lockdep information
with a *counter*? I haven't found it. Did I perhaps overlook something?
Please look fs/kernfs/dir.c, and there should be more in linux kernel.
From block/blk-core.c:
error = percpu_ref_init(&q->q_usage_counter,
blk_queue_usage_counter_release,
PERCPU_REF_INIT_ATOMIC, GFP_KERNEL);
The per-cpu ref implementation occurs in the following source files:
include/linux/percpu-refcount.h and lib/percpu-refcount.c. It is not
clear to me how fs/kernfs/dir.c is related to q->q_usage_counter?
Thanks,
Bart.