diff options
| author | Hans Verkuil <hverkuil@xs4all.nl> | 2024-12-09 16:00:16 +0100 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2025-02-18 08:11:36 +0100 |
| commit | e4740118b752005cbed339aec9a1d1c43620e0b9 (patch) | |
| tree | b4e9d115b175386af54ef432c65f47a479a032d1 /tools/perf/scripts/python | |
| parent | media: dw9719: Add DW9761 support (diff) | |
| download | linux-e4740118b752005cbed339aec9a1d1c43620e0b9.tar.gz linux-e4740118b752005cbed339aec9a1d1c43620e0b9.zip | |
media: test-drivers: vivid: don't call schedule in loop
Artem reported that the CPU load was 100% when capturing from
vivid at low resolution with ffmpeg.
This was caused by:
while (time_is_after_jiffies(cur_jiffies + wait_jiffies) &&
!kthread_should_stop())
schedule();
If there are no other processes running that can be scheduled,
then this is basically a busy-loop.
Change it to wait_event_interruptible_timeout() which doesn't
have that problem.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Reported-by: Artem S. Tashkinov <aros@gmx.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219570
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
