Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3400545imw; Mon, 18 Jul 2022 07:29:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vsttNy2cL7eYLq+SsrygCtkg/ZLpeYeprDBqMnf3VPvAR1NmowGnGDRgcS9Tgldt26V8Ox X-Received: by 2002:a17:906:11d:b0:712:abf:3210 with SMTP id 29-20020a170906011d00b007120abf3210mr25762728eje.292.1658154551319; Mon, 18 Jul 2022 07:29:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658154551; cv=none; d=google.com; s=arc-20160816; b=TaxeXHDpwhsv6FTRyiNVJ/2TSaIaM7REmrVXoCo9v/KAyi8a9kKogC263ihn1ul2nt ZXtCkqK/E0P0KRaeq96mhY9xmk/TSL7dwWP56Cd6Htrh5nx4ZS/LubvfVCkWKVxPvyns fqVUiMC88l0gLPVcFHQ08UtaTqDOGZfiuvmBGboNKfGqDack5YimFndY/mb5c1IIsuml pilkhh/+imxyAPOIje4lq0uDis4lgzFaxmLgnKG7xXE9Vpp26P+OOvRRNNN7KNvAt5tB wilVmf0gbT3+w5fa12vV1MvE3nh8inSwQ0GTZkVfdJR6saDoKo60mM98fGf7dLzJgfeS L8UA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=dEA1bHhQMO4B/y88HY0jOcsYBA+2978MU09s7LiN5QI=; b=aNU9TlzAPMKRf8nU/qYzR+mMUtC/jAxf0KdmVJ8op7T+go9MTv/Dp8O+spjjOJ7dcQ x3ULR6kpb0CK6c005qIOmy2UfDFOOWxXWyCjeWwXG7QSJuPKB7ZX7sTXkVZbbAxi7/7T AUNF5bcOfqVupD1g3kYCL0FOtgmp4zE+ICJL6wV09Td+L3i3cJdULftrAUUfmQv2DJLN ablx8hV9GhiO0qlPOLXILSUOtaU5iuflTpHuHYONa/dDCzyjuGtrus6FgBLeoWueQXBK JkZj+GQt7CAvHjXHnu/mtJq9fJsTwaIMkwcGvgswYkfY4IykjBqyubWVYfqZrPF8jIgb //2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BJWyFDRi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd27-20020a1709076e1b00b0072b4da29118si16920627ejc.443.2022.07.18.07.28.44; Mon, 18 Jul 2022 07:29:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BJWyFDRi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233462AbiGRNj0 (ORCPT + 99 others); Mon, 18 Jul 2022 09:39:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232158AbiGRNjX (ORCPT ); Mon, 18 Jul 2022 09:39:23 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D24E817E07; Mon, 18 Jul 2022 06:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658151562; x=1689687562; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=S7SbUtL4cXYV52pGPG02yhwUZTGsc8NrJiIgLWn4W7c=; b=BJWyFDRip95JHzoYbGH+0DJ5V+5dZPT5+ghBR6VSZhIV2Sqr93d4UiF8 vyOup5u3xyJl1hq094RnKf1auqXDBZbp9bsr+Jswxg/ViL59RW0re12G5 tIu2Kbh50MTIydoAUHI5BUsLFZMBjCPHTuQuWomNIHqUcwaiM9K5ET51k 8O6rRKsTzUHEUvQHis3mhsen8c3evSq3G1zntgO5ygCg2jWaq8ZgpHVaK GVDVmARwIuA5VxpOif4yGpmfcqlLP1FzzDj+YD2vAIRsyGoKd0PyWLw+K Uml8CVijb5kJ2+pCaOq4GWWM8iuL+jl2jynAxA7Yg+SV1M08qTz86zX8E Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10411"; a="350181894" X-IronPort-AV: E=Sophos;i="5.92,281,1650956400"; d="scan'208";a="350181894" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 06:39:22 -0700 X-IronPort-AV: E=Sophos;i="5.92,281,1650956400"; d="scan'208";a="686737192" Received: from smyint-mobl1.amr.corp.intel.com (HELO [10.212.107.15]) ([10.212.107.15]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jul 2022 06:39:19 -0700 Message-ID: <72a40626-ee71-fffe-3816-933fbec92c4d@linux.intel.com> Date: Mon, 18 Jul 2022 14:39:17 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2 04/21] drm/i915/gt: Only invalidate TLBs exposed to user manipulation Content-Language: en-US To: Mauro Carvalho Chehab Cc: Chris Wilson , Daniel Vetter , Dave Airlie , David Airlie , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Fei Yang , Andi Shyti , =?UTF-8?Q?Thomas_Hellstr=c3=b6m?= References: From: Tvrtko Ursulin Organization: Intel Corporation UK Plc In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,HK_RANDOM_ENVFROM,HK_RANDOM_FROM, NICE_REPLY_A,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/07/2022 13:06, 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 concurrent access > and stale access from prefetch. > > We only need to invalidate the TLB if they are accessible by the user. > That helps to reduce the performance regression introduced by TLB > invalidate logic. > > Cc: stable@vger.kernel.org > Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") Do we really need or want stable and fixes on this one? What do we think the performance improvement is, given there's very little in GGTT, which is not mapped via PPGTT as well? I think it is safe, but part of me would ideally not even want to think about whether it is safe, if the performance improvement is non-existent. Which I can't imagine how there would be? Regards, Tvrtko > Signed-off-by: Chris Wilson > Cc: Fei Yang > Cc: Andi Shyti > Acked-by: Thomas Hellström > Signed-off-by: Mauro Carvalho Chehab > --- > > To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover. > See [PATCH v2 00/21] at: https://lore.kernel.org/all/cover.1657800199.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 ef3b04c7e153..646f419b2035 100644 > --- a/drivers/gpu/drm/i915/i915_vma.c > +++ b/drivers/gpu/drm/i915/i915_vma.c > @@ -538,7 +538,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;