aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2024-08-09 12:42:30 +0200
committerTakashi Iwai <[email protected]>2024-08-09 14:24:55 +0200
commit38ea4c3dc306edf6f4e483e8ad9cb8d33943afde (patch)
tree241b50a1da29ca1bafcd5115ca43d3567aec3f38 /tools/perf/scripts/python/Perf-Trace-Util/lib
parentf428cc9eac6e29d57579be4978ba210c344322ea (diff)
ALSA: control: Optimize locking for look-up
For a fast look-up of a control element via either numid or name matching (enabled via CONFIG_SND_CTL_FAST_LOOKUP), a locking isn't needed at all thanks to Xarray. OTOH, the locking is still needed for a slow linked-list traversal, and that's rather a rare case. In this patch, we reduce the use of locking at snd_ctl_find_*() API functions, and switch from controls_rwsem to controls_rwlock for avoiding unnecessary lock inversions. This also resulted in a nice cleanup, as *_unlocked() version of snd_ctl_find_*() APIs can be dropped. snd_ctl_find_id_mixer_unlocked() is still left just as an alias of snd_ctl_find_id_mixer(), since soc-card.c has a wrapper and there are several users. Once after converting there, we can remove it later. Signed-off-by: Takashi Iwai <[email protected]> Link: https://patch.msgid.link/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib')
0 files changed, 0 insertions, 0 deletions