summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorChen Linxuan <chenlinxuan@uniontech.com>2025-03-17 05:29:24 +0300
committerJens Axboe <axboe@kernel.dk>2025-03-18 21:32:09 +0300
commite1a0202c6bfda24002a3ae2115154fa90104c649 (patch)
treede891e9323369bbfc8f266ae784b884f1390b1f4 /tools/perf/scripts/python/stackcollapse.py
parent86947bdc28894520ed5aab0cf21b99ff0b659e07 (diff)
downloadlinux-e1a0202c6bfda24002a3ae2115154fa90104c649.tar.xz
blk-cgroup: improve policy registration error handling
This patch improve the returned error code of blkcg_policy_register(). 1. Move the validation check for cpd/pd_alloc_fn and cpd/pd_free_fn function pairs to the start of blkcg_policy_register(). This ensures we immediately return -EINVAL if the function pairs are not correctly provided, rather than returning -ENOSPC after locking and unlocking mutexes unnecessarily. Those locks should not contention any problems, as error of policy registration is a super cold path. 2. Return -ENOMEM when cpd_alloc_fn() failed. Co-authored-by: Wen Tao <wentao@uniontech.com> Signed-off-by: Wen Tao <wentao@uniontech.com> Signed-off-by: Chen Linxuan <chenlinxuan@uniontech.com> Reviewed-by: Michal Koutný <mkoutny@suse.com> Acked-by: Tejun Heo <tj@kernel.org> Reviewed-by: Yu Kuai <yukuai3@huawei.com> Link: https://lore.kernel.org/r/3E333A73B6B6DFC0+20250317022924.150907-1-chenlinxuan@uniontech.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions