From patchwork Mon Jul 4 07:08:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9211707 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F031F60752 for ; Mon, 4 Jul 2016 07:08:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DECEB28600 for ; Mon, 4 Jul 2016 07:08:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D3A5128608; Mon, 4 Jul 2016 07:08:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9267628600 for ; Mon, 4 Jul 2016 07:08:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4014C6E399; Mon, 4 Jul 2016 07:08:52 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-wm0-x243.google.com (mail-wm0-x243.google.com [IPv6:2a00:1450:400c:c09::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id D861D6E391 for ; Mon, 4 Jul 2016 07:08:50 +0000 (UTC) Received: by mail-wm0-x243.google.com with SMTP id c82so19368517wme.3 for ; Mon, 04 Jul 2016 00:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:date:message-id:in-reply-to:references; bh=jnOuxBd2ejif+Lz5oh4HogTNWKX0qGOe8gDQVGRrPrs=; b=geLYMsBBMJYC1CagIhFNFrP82xvA/7Ip3qXi93+r1ubS0Zreooj5N28CDzFMul90qW OutX+O37tTCt/lvaj0OYFFHIlq/aD9hvm8nF5PGCg8A0532kyxZUxcjiA7SV7VsRQx2X qJsrq3dX3Y2MuN8F9DZCn2pvogrACO5EUNOQ1Gw9PYhR+jeU043miKH2MxPw8K7Skhz9 JISU+aP514h0+QRnoL1bWJNcb+G+ODnvOkjZoQMTTMAAxQjaUF9LoKgjEb+lcnQA+Q1L eiyweLtO71hl5M/f1h6V3wepuDsT5/eQKLyne0fDuAEx3KQEGpbWgeKtFKBUJLlypQXJ NrBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references; bh=jnOuxBd2ejif+Lz5oh4HogTNWKX0qGOe8gDQVGRrPrs=; b=h8JBkPTCcL84JN6z6TtGsbzdPojr6OYMr70DRNnv47gIbzcVty5ZedZgEtiGa9e7fB 9mUY1n/H5/xRs+NKFncDkLqbe7+UbGWjsKZaNZqNqmKXUyR/P3A5b/j2jKJ8XIfY/g32 ygqc1S9MM1w1A1gdFk7rmZZgeOJvu7zbbABPQsohTUZXjfLvVzzURRNiQe1CAoEE4f5G YZg4U89JowG6b8epWzt+pc6L7vJRPemji0HcBqzI/uKnlvCKp7ZQMzXnszxfeH+xIflO Z3+gEeDEA0O8Dwgv5TcBLDsr+y9/K+9KTYn1/sm6djNSWP0RvSQGTw8QhmNIw3gjv43q ydwg== X-Gm-Message-State: ALyK8tJg1mF73NGAV0zL2D6BUEMlN8Ol7hn+diAxlWh3eMCUmfZkLgca6dl8yeyPZq0Ydw== X-Received: by 10.194.176.35 with SMTP id cf3mr1965840wjc.148.1467616129170; Mon, 04 Jul 2016 00:08:49 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id f189sm6249616wmf.19.2016.07.04.00.08.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jul 2016 00:08:48 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Date: Mon, 4 Jul 2016 08:08:35 +0100 Message-Id: <1467616119-4093-5-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1467616119-4093-1-git-send-email-chris@chris-wilson.co.uk> References: <1467616119-4093-1-git-send-email-chris@chris-wilson.co.uk> Subject: [Intel-gfx] [CI 5/9] drm/i915: Add background commentary to "waitboosting" X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Describe the intent of boosting the GPU frequency to maximum before waiting on the GPU. RPS waitboosting was introduced with commit b29c19b64528 ("drm/i915: Boost RPS frequency for CPU stalls") but lacked a concise comment in the code to explain itself. Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_gem.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 037b26e2a960..b11884d656cf 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -1462,6 +1462,21 @@ int __i915_wait_request(struct drm_i915_gem_request *req, trace_i915_gem_request_wait_begin(req); + /* This client is about to stall waiting for the GPU. In many cases + * this is undesirable and limits the throughput of the system, as + * many clients cannot continue processing user input/output whilst + * blocked. RPS autotuning may take tens of milliseconds to respond + * to the GPU load and thus incurs additional latency for the client. + * We can circumvent that by promoting the GPU frequency to maximum + * before we wait. This makes the GPU throttle up much more quickly + * (good for benchmarks and user experience, e.g. window animations), + * but at a cost of spending more power processing the workload + * (bad for battery). Not all clients even want their results + * immediately and for them we should just let the GPU select its own + * frequency to maximise efficiency. To prevent a single client from + * forcing the clocks too high for the whole system, we only allow + * each client to waitboost once in a busy period. + */ if (INTEL_INFO(req->i915)->gen >= 6) gen6_rps_boost(req->i915, rps, req->emitted_jiffies);