On Fri, Jun 2, 2023 at 12:01 AM menglong8.dong@gmail.com wrote:
From: Menglong Dong imagedong@tencent.com
According to the current kernel version, below is a statistics of the function arguments count:
argument count | FUNC_PROTO count 7 | 367 8 | 196 9 | 71 10 | 43 11 | 22 12 | 10 13 | 15 14 | 4 15 | 0 16 | 1
It's hard to statisics the function count, so I use FUNC_PROTO in the btf of vmlinux instead. The function with 16 arguments is ZSTD_buildCTable(), which I think can be ignored.
Therefore, let's make the maximum of function arguments count 14. It used to be 12, but it seems that there is no harm to make it big enough.
I think we're just fine at 12. People need to fix their code. ZSTD_buildCTable should be first in line. Passing arguments on the stack is not efficient from performance pov.