Repeated calls to sched_setaffinity slow down rendering
nimrod-gileadi opened this issue · 1 comments
nimrod-gileadi commented
I have a program that performs off-screen rendering of a simple scene repeatedly, as fast as possible.
When I run it, I get 450 fps. Looking at a CPU profiler, I noticed that the sched_setaffinity system call was taking a lot of time.
When I comment out this line, I get 600 fps on the same benchmark:
filament/libs/utils/src/JobSystem.cpp
Line 442 in 05ce5ea
Given the comments, it sounds like this is working around an Android issue. Would it be possible to make this build-configurable, to avoid paying this cost on other linux platforms?
Logs
WARNING: Using soft CircularBuffer (6144 KiB)
FEngine (64 bits) created at 0x56514cc73500 (threading is enabled)
FEngine resolved backend: Vulkan
Vulkan device driver: NVIDIA 525.147.05
Selected physical device 'NVIDIA GeForce RTX 2080 Ti' from 2 physical devices. (vendor 0x10de, device 0x1e04, driver 0x8364c140, api 1.3)
Backend feature level: 1
FEngine feature level: 1
Desktop (please complete the following information):
- OS: Linux
- GPU: NVIDIA GeForce RTX 2080 Ti
- Backend: Vulkan
pixelflinger commented
note: Similar to b/333949404