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=-8.3 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable 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 E6DDBC433E0 for ; Tue, 21 Jul 2020 15:34:05 +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 8D364206E9 for ; Tue, 21 Jul 2020 15:34:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=shipmail.org header.i=@shipmail.org header.b="rKYv4YXb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8D364206E9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shipmail.org 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 2D74B6E40F; Tue, 21 Jul 2020 15:34:05 +0000 (UTC) Received: from ste-pvt-msa2.bahnhof.se (ste-pvt-msa2.bahnhof.se [213.80.101.71]) by gabe.freedesktop.org (Postfix) with ESMTPS id A03C26E40F for ; Tue, 21 Jul 2020 15:34:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTP id A3E4D3F873; Tue, 21 Jul 2020 17:34:00 +0200 (CEST) Authentication-Results: ste-pvt-msa2.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b=rKYv4YXb; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se Authentication-Results: ste-ftg-msa2.bahnhof.se (amavisd-new); dkim=pass (1024-bit key) header.d=shipmail.org Received: from ste-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (ste-ftg-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oCc7_liTk7Zs; Tue, 21 Jul 2020 17:33:59 +0200 (CEST) Received: from mail1.shipmail.org (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) (Authenticated sender: mb878879) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id 772A03F8A9; Tue, 21 Jul 2020 17:33:59 +0200 (CEST) Received: from [192.168.0.100] (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) by mail1.shipmail.org (Postfix) with ESMTPSA id 34E5236010A; Tue, 21 Jul 2020 17:34:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1595345640; bh=XrDTEXV7CZ+HV14hX5vOpaiOP244vZkpbBWdK7Rdhnw=; h=Subject:To:References:From:Date:In-Reply-To:From; b=rKYv4YXbG+IQE9U8kqosPiJySvSTLKi/18QcGh2kqiAzU6hqYkQ55G0GMjcWGYOso 6RQtstKHHf2JoYRSzfSB2YaMwXzZBMP5EDYXhMJatQtxFJwdGXHuO3v48JpLaXXgMc PVBXbz6mQd5UlFDZwygwB4wZVliMFCrxFIeMOyJg= To: Chris Wilson , intel-gfx@lists.freedesktop.org References: <20200715115147.11866-1-chris@chris-wilson.co.uk> <20200715115147.11866-6-chris@chris-wilson.co.uk> From: =?UTF-8?Q?Thomas_Hellstr=c3=b6m_=28Intel=29?= Message-ID: Date: Tue, 21 Jul 2020 17:33:59 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200715115147.11866-6-chris@chris-wilson.co.uk> Content-Language: en-US Subject: Re: [Intel-gfx] [PATCH 06/66] drm/i915: Export a preallocate variant of i915_active_acquire() 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 2020-07-15 13:50, Chris Wilson wrote: > Sometimes we have to be very careful not to allocate underneath a mutex > (or spinlock) and yet still want to track activity. Enter > i915_active_acquire_for_context(). This raises the activity counter on > i915_active prior to use and ensures that the fence-tree contains a slot > for the context. > > Signed-off-by: Chris Wilson > --- > .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +- > drivers/gpu/drm/i915/gt/intel_timeline.c | 4 +- > drivers/gpu/drm/i915/i915_active.c | 136 +++++++++++++++--- > drivers/gpu/drm/i915/i915_active.h | 12 +- > 4 files changed, 126 insertions(+), 28 deletions(-) > ... > /* > * We track the most recently used timeline to skip a rbtree search > @@ -230,8 +260,8 @@ active_instance(struct i915_active *ref, struct intel_timeline *tl) > * after the previous activity has been retired, or if it matches the > * current timeline. > */ In addition to Tvrtko's comments, Should this comment be moved to __active_lookup() ? /Thomas _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx