vp8: Remove sched_yield on POSIX systems

libvpx does sched_yield() on Linux. This is highly frowned upon these
days mainly because it is not needed and causes high scheduler overhead.

It is not needed because the kernel will preempt the task while it is
spinning which will imply a yield. On ChromeOS, not yielding has the
following improvements:

1. power_VideoCall test as seen on perf profile:

With yield:
     9.40%  [kernel]            [k] __pi___clean_dcache_area_poc
     7.32%  [kernel]            [k] _raw_spin_unlock_irq  <-- kernel scheduler

Without yield:
     8.76%  [kernel]            [k] __pi___clean_dcache_area_poc
     2.27%  [kernel]            [k] _raw_spin_unlock_irq  <-- kernel scheduler

As you can see, there is a 5% drop in the scheduler's CPU utilization.

2. power_VideoCall test results:

There is a 3% improvement on max video FPS, from 30 to 31. This
improvement is consistent.

Also note that the sched_yield() manpage itself says it is intended
only for RT tasks. From manpagE: "sched_yield() is intended for use
with real-time scheduling policies (i.e., SCHED_FIFO or SCHED_RR)
and very likely means your application design is broken."

BUG=b/168205004

Change-Id: Idb84ab19e94f6d0c7f9e544e7a407c946d5ced5c
Signed-off-by: Joel Fernandes <joelaf@google.com>
1 file changed