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 AE0DEC43334 for ; Thu, 16 Jun 2022 07:33:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7ACCF892CC; Thu, 16 Jun 2022 07:33:32 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 28D4710EC9C; Thu, 16 Jun 2022 07:33:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655364810; x=1686900810; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=5fosfAjzAZBHADth+UjPo9ukq2bY8/4uhcqIhxkcAbw=; b=fNyOhskVz4qlsHMfWtg4hhAyot8he3Qg/5d6zFprAj6sWrN+ML1D72FM O5JxrUKGd0xIMq198kD5qJEKQbo14AzrUyckI95OnEB0swMQFicgiSjuz WUTEN6K7OO4a9/kY+5Tf333YuAqYNGy0sYe4uuwepfUp4TGYiR6HtTEQF moHHXiH8HBO+uxUEsDCVLGWr3GHZtHWWI0gEZ9/D/7HoXJ7sws5IbIAZm Vm8V8jdD4RIyCBirPJQLrT4KDFjp9goP76qjoVp/LuNMcXWGWT4zc8nA4 vOXd7B2MMU3wUakeiwqY7cqIphdoqVgwbjK2bL4ShYX5qJhri5nCYmbIb A==; X-IronPort-AV: E=McAfee;i="6400,9594,10379"; a="279904336" X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="279904336" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 00:33:29 -0700 X-IronPort-AV: E=Sophos;i="5.91,304,1647327600"; d="scan'208";a="912048023" Received: from mstokes1-mobl.ger.corp.intel.com (HELO [10.213.198.82]) ([10.213.198.82]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Jun 2022 00:33:25 -0700 Message-ID: <7c29c710-64ee-6e87-afb4-6d6b51e26315@linux.intel.com> Date: Thu, 16 Jun 2022 08:33:24 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Content-Language: en-US To: Mauro Carvalho Chehab References: <387b9a8d3e719ad2db4fce56c0bfc0f909fd6df6.1655306128.git.mchehab@kernel.org> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc In-Reply-To: <387b9a8d3e719ad2db4fce56c0bfc0f909fd6df6.1655306128.git.mchehab@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Intel-gfx] [PATCH 4/6] drm/i915/gt: Only invalidate TLBs exposed to user manipulation 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: =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= , mauro.chehab@linux.intel.com, David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Chris Wilson , Thomas Hellstrom , Rodrigo Vivi , Dave Airlie , stable@vger.kernel.org, intel-gfx@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 15/06/2022 16:27, Mauro Carvalho Chehab wrote: > From: Chris Wilson > > Don't flush TLBs when the buffer is only used in the GGTT under full > control of the kernel, as there's no risk of of concurrent access > and stale access from prefetch. > > We only need to invalidate the TLB if they are accessible by the user. > > Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") Same question as against the other patch - fix or optimisation? Regards, Tvrtko > Signed-off-by: Chris Wilson > Cc: Fei Yang > Cc: Andi Shyti > Cc: stable@vger.kernel.org > Acked-by: Thomas Hellström > Signed-off-by: Mauro Carvalho Chehab > --- > > See [PATCH 0/6] at: https://lore.kernel.org/all/cover.1655306128.git.mchehab@kernel.org/ > > drivers/gpu/drm/i915/i915_vma.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c > index 0bffb70b3c5f..7989986161e8 100644 > --- a/drivers/gpu/drm/i915/i915_vma.c > +++ b/drivers/gpu/drm/i915/i915_vma.c > @@ -537,7 +537,8 @@ int i915_vma_bind(struct i915_vma *vma, > bind_flags); > } > > - set_bit(I915_BO_WAS_BOUND_BIT, &vma->obj->flags); > + if (bind_flags & I915_VMA_LOCAL_BIND) > + set_bit(I915_BO_WAS_BOUND_BIT, &vma->obj->flags); > > atomic_or(bind_flags, &vma->flags); > return 0;