FROMLIST: sched: Don't try to catch up excess steal time.
When steal time exceeds the measured delta when updating clock_task, we currently try to catch up the excess in future updates. However, this results in inaccurate run times for the future things using clock_task, as they end up getting additional steal time that did not actually happen. For example, suppose a task in a VM runs for 10ms and had 15ms of steal time reported while it ran. clock_task rightly doesn't advance. Then, a different taks runs on the same rq for 10ms without any time stolen in the host. Because of the current catch up mechanism, clock_sched inaccurately ends up advancing by only 5ms instead of 10ms even though there wasn't any actual time stolen. The second task is getting charged for less time than it ran, even though it didn't deserve it. This can result in tasks getting more run time than they should actually get. So, we instead don't make future updates pay back past excess stolen time. (am from https://lore.kernel.org/lkml/20240806111157.1336532-1-suleiman@google.com/ ) BUG=b:340428186 TEST=Built. Change-Id: I3719cd82fa40492a24713048238d7a4d5f2d5113 Signed-off-by:Suleiman Souhlal <suleiman@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/5822724 Reviewed-by:
Joel Fernandes <joelaf@google.com> Signed-off-by:
Hubert Mazur <hmazur@google.com>
Loading
Please sign in to comment