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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E50F3C433FE for ; Fri, 30 Sep 2022 12:00:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 27F6310ECBB; Fri, 30 Sep 2022 12:00:33 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1F37910E222; Fri, 30 Sep 2022 12:00:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664539229; x=1696075229; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=6fVJ0yxVKYuGBhuyCKaraJ5NgYzNje9iJ34fYNSSdRY=; b=HZdoPN2OXM2YjpnW4FheD4VesigXxFtQWtxxiliBZdaNvkhH2c6Nh1nH NEu/jIHrx+Kw6z8yaWoeFPpQo4wRhu2J8K3EiKpxt97hpCSZ0lskXTHAc giaweGbOejjwUar/ejGMbUwlJyH+XjNJZO6ZJC7rn7wUrb8DHUd8ge9uo xGsjracFxbW4QuSPoBbyANK0Sox0OPH760fJGjqGHjuelHUSMGSOiBWoh 9XBpGVJC5Lpby+Cd3z6jy+NXlr73dNTaxXklaUK+e4Jnot14q34eDm0Zh puK0RIMZuruy3ZQK9kbZLt+gDS+uJe8a7Jkhqyv6RxbPg1MwVoSbExcql g==; X-IronPort-AV: E=McAfee;i="6500,9779,10485"; a="328556023" X-IronPort-AV: E=Sophos;i="5.93,358,1654585200"; d="scan'208";a="328556023" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2022 05:00:28 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10485"; a="726834648" X-IronPort-AV: E=Sophos;i="5.93,358,1654585200"; d="scan'208";a="726834648" Received: from ashyti-mobl2.igk.intel.com (HELO intel.com) ([172.28.182.81]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2022 05:00:25 -0700 Date: Fri, 30 Sep 2022 14:00:23 +0200 From: Andi Shyti To: Niranjana Vishwanathapura Message-ID: References: <20220928061918.6340-1-niranjana.vishwanathapura@intel.com> <20220928061918.6340-9-niranjana.vishwanathapura@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220928061918.6340-9-niranjana.vishwanathapura@intel.com> Subject: Re: [Intel-gfx] [PATCH 08/16] drm/i915/vm_bind: Support persistent vma activeness tracking 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: , Cc: paulo.r.zanoni@intel.com, jani.nikula@intel.com, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, thomas.hellstrom@intel.com, matthew.auld@intel.com, daniel.vetter@intel.com, christian.koenig@amd.com Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi Niranjana, On Tue, Sep 27, 2022 at 11:19:10PM -0700, Niranjana Vishwanathapura wrote: > Do not use i915_vma activeness tracking for persistent vmas. > > As persistent vmas are part of working set for each execbuf > submission on that address space (VM), a persistent vma is > active if the VM active. As vm->root_obj->base.resv will be > updated for each submission on that VM, it correctly > represent whether the VM is active or not. > > Add i915_vm_is_active() and i915_vm_sync() functions based > on vm->root_obj->base.resv with DMA_RESV_USAGE_BOOKKEEP > usage. dma-resv fence list will be updated with this usage > during each submission with this VM in the new execbuf3 > ioctl path. > > Update i915_vma_is_active(), i915_vma_sync() and the > __i915_vma_unbind_async() functions to properly handle > persistent vmas. > > Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Andi Shyti Andi