[02/22] drm/i915: Trim set_timer_ms() intervals
diff mbox series

Message ID 20200604103751.18816-2-chris@chris-wilson.co.uk
State New
Headers show
Series
  • [01/22] drm/i915/gem: Mark the buffer pool as active for the cmdparser
Related show

Commit Message

Chris Wilson June 4, 2020, 10:37 a.m. UTC
Use the plain msec_to_jiffies() rather than the _timeout variant so we
round down and do not add an extra jiffy to our interval. For example,
with timeslicing we do not want to err on the longer side as any
fairness depends on catching hogging contexts on the GPU. Bring on
CFS.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Matthew Auld June 4, 2020, 12:54 p.m. UTC | #1
On Thu, 4 Jun 2020 at 11:38, Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> Use the plain msec_to_jiffies() rather than the _timeout variant so we
> round down and do not add an extra jiffy to our interval. For example,
> with timeslicing we do not want to err on the longer side as any
> fairness depends on catching hogging contexts on the GPU. Bring on
> CFS.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/i915_utils.c b/drivers/gpu/drm/i915/i915_utils.c
index e28eae4a8f70..f42a9e9a0b4f 100644
--- a/drivers/gpu/drm/i915/i915_utils.c
+++ b/drivers/gpu/drm/i915/i915_utils.c
@@ -91,7 +91,7 @@  void set_timer_ms(struct timer_list *t, unsigned long timeout)
 		return;
 	}
 
-	timeout = msecs_to_jiffies_timeout(timeout);
+	timeout = msecs_to_jiffies(timeout);
 
 	/*
 	 * Paranoia to make sure the compiler computes the timeout before