OSDN Git Service

staging: sync: Use an on-stack allocation for fence info ioctl
authorSultan Alsawaf <sultan@kerneltoast.com>
Wed, 31 Jul 2019 06:56:18 +0000 (23:56 -0700)
committer0ranko0P <ranko0p@outlook.com>
Sat, 7 Dec 2019 10:22:18 +0000 (18:22 +0800)
commitf5200076eb9c6d18fa1be56f5abf1097ce6cafa3
tree90cae32cacad90df55c903e26f45ad95564bf796
parentd0691b7eede7fd83875dce5822a3c54a081b3d6d
staging: sync: Use an on-stack allocation for fence info ioctl

Since the fence info ioctl limits output data length to 4096 bytes, we
can just use a 4096-byte on-stack buffer for it (which is confirmed to
be safe via runtime stack usage measurements). This ioctl is used for
every frame rendered to the display, so eliminating dynamic memory
allocation overhead here improves frame rendering performance.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
drivers/staging/android/sync.c