summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2026-03-11 15:07:11 +0000
committerDavid Sterba <dsterba@suse.com>2026-04-07 18:56:04 +0200
commit87f5c3139ee34e0642584cff86298ef4b9a827ef (patch)
tree25e7aa3f121f9ffe36e89f14db02cede7b68f2d6 /tools/lib/python/kdoc
parentd110eb2f7f58c7b74c558dc922d5dae3e1b94362 (diff)
btrfs: avoid unnecessary wake ups on io trees when there are no waiters
Whenever clearing the extent lock bits of an extent state record, we unconditionally call wake_up() on the state's waitqueue. Most of the time there are no waiters on the queue so we are just wasting time calling wake_up(), since that requires locking and unlocking the queue's spinlock, disable and re-enable interrupts, function calls, and other minor overhead while we are holding a critical section delimited by the extent io tree's spinlock. So call wake_up() only if there are waiters on an extent state's wait queue. Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/lib/python/kdoc')
0 files changed, 0 insertions, 0 deletions