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=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 3290EC433E0 for ; Tue, 30 Jun 2020 11:52:38 +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 02E7620702 for ; Tue, 30 Jun 2020 11:52:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 02E7620702 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com 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 967CB89065; Tue, 30 Jun 2020 11:52:37 +0000 (UTC) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id CCAC289065 for ; Tue, 30 Jun 2020 11:52:36 +0000 (UTC) IronPort-SDR: DuOC78c1QyofhajTELFYHwdqHQg+ZgOH7POnhSgZWxc6dUN3bu1wfSiXPc3FXlGi3/sjz5jNuu RQ24+VdMvWTA== X-IronPort-AV: E=McAfee;i="6000,8403,9666"; a="231078893" X-IronPort-AV: E=Sophos;i="5.75,297,1589266800"; d="scan'208";a="231078893" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jun 2020 04:52:38 -0700 IronPort-SDR: HMrmRMMmi5O33Wqs4vtdCvmgu6solRNQF1tYWQJZvzDOAFo83P91XJ7Qov3urj3AIfQywmLKYX quDTXcSVmc8A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,297,1589266800"; d="scan'208";a="277401314" Received: from pozo-mobl1.ger.corp.intel.com (HELO [10.252.54.227]) ([10.252.54.227]) by orsmga003.jf.intel.com with ESMTP; 30 Jun 2020 04:52:35 -0700 To: Tvrtko Ursulin , intel-gfx@lists.freedesktop.org References: <20200623142843.423594-1-maarten.lankhorst@linux.intel.com> <20200623142843.423594-7-maarten.lankhorst@linux.intel.com> From: Maarten Lankhorst Message-ID: Date: Tue, 30 Jun 2020 13:52:34 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Subject: Re: [Intel-gfx] [PATCH 07/26] Revert "drm/i915/gem: Split eb_vma into its own allocation" 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" Op 29-06-2020 om 17:08 schreef Tvrtko Ursulin: > > On 23/06/2020 15:28, Maarten Lankhorst wrote: >> This reverts commit 0f1dd02295f35dcdcbaafcbcbbec0753884ab974. >> This conflicts with the ww mutex handling, which needs to drop >> the references after gpu submission anyway, because otherwise we >> may risk unlocking a BO after first freeing it. > > What is the problem here? eb_vma_array_put in eb_move_to_gpu? If so, could you just move this put to later in the sequence? I am simply thinking how to avoid controversial reverts. Because on the other hand I did not figure out what 0f1dd02295f35dcdcbaafcbcbbec0753884ab974 fixed in a few minutes I spent staring at the patch. We need to unlock before we unref to prevent a use-after-free in unlock, so freeing and releasing in eb_move_to_gpu() is too early. This means we only end up with 1 path for unlock, so it's fine to revert. _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx