On Fri, 08 Nov 2024 13:45:00 +0800, David Wang wrote: > seq_printf is costy, for each block device, 19 decimal values are > yielded in /proc/diskstats via seq_printf; On a system with 16 > logical block devices, profiling for open/read/close sequences > shows seq_printf took ~75% samples of diskstats_show: > > diskstats_show(92.626% 2269372/2450040) > seq_printf(76.026% 1725313/2269372) > vsnprintf(99.163% 1710866/1725313) > format_decode(26.597% 455040/1710866) > number(19.554% 334542/1710866) > memcpy_orig(4.183% 71570/1710866) > ... > srso_return_thunk(0.009% 148/1725313) > part_stat_read_all(8.030% 182236/2269372) > > [...] Applied, thanks! [1/1] block:genhd:/proc/diskstats: use seq_put_decimal_ull for decimal values commit: bda9c7d92f24b693eaf0262c090de4c8c108a28e Best regards, -- Jens Axboe