From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 966CBC33CAD for ; Mon, 13 Jan 2020 14:05:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7481620678 for ; Mon, 13 Jan 2020 14:05:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7481620678 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chris-wilson.co.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B22B89E7C; Mon, 13 Jan 2020 14:05:30 +0000 (UTC) Received: from fireflyinternet.com (mail.fireflyinternet.com [109.228.58.192]) by gabe.freedesktop.org (Postfix) with ESMTPS id 58C3289E7C for ; Mon, 13 Jan 2020 14:05:28 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from localhost (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 19862287-1500050 for multiple; Mon, 13 Jan 2020 14:05:23 +0000 MIME-Version: 1.0 To: intel-gfx@lists.freedesktop.org From: Chris Wilson In-Reply-To: <20200113140407.1856468-1-chris@chris-wilson.co.uk> References: <20200113140407.1856468-1-chris@chris-wilson.co.uk> Message-ID: <157892432115.27314.1909500564236150161@skylake-alporthouse-com> User-Agent: alot/0.6 Date: Mon, 13 Jan 2020 14:05:21 +0000 Subject: Re: [Intel-gfx] [PATCH] drm/i915: Preemptive timeline retirement X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Quoting Chris Wilson (2020-01-13 14:04:07) > Currently, we only retire the oldest request on the timeline before > allocating the next, but only if there is a spare request. However, > since we rearranged the locking, e.g. commit df9f85d8582e ("drm/i915: > Serialise i915_active_fence_set() with itself"), we no longer benefit > from keeping the active chain intact underneath the struct_mutex. As > such, retire all completed requests in the client's timeline before > creating the next, trying to keep our memory and resource usage tight > and ideally only penalising the heavy users. > > References: df9f85d8582e ("drm/i915: Serialise i915_active_fence_set() with itself") > Signed-off-by: Chris Wilson > Cc: Tvrtko Ursulin > --- > drivers/gpu/drm/i915/i915_request.c | 44 ++++------------------------- > 1 file changed, 5 insertions(+), 39 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c > index 9ed0d3bc7249..5743edb50688 100644 > --- a/drivers/gpu/drm/i915/i915_request.c > +++ b/drivers/gpu/drm/i915/i915_request.c > @@ -558,21 +558,12 @@ request_alloc_slow(struct intel_timeline *tl, gfp_t gfp) > { > struct i915_request *rq; > > - if (list_empty(&tl->requests)) > - goto out; > + if (gfpflags_allow_blocking(gfp)) I am an idiot. -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx