lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <453f12ce-e982-0d53-37e4-7e72f1538838@linux.intel.com>
Date:   Wed, 22 Jun 2022 12:50:04 +0200
From:   Thomas Hellström 
        <thomas.hellstrom@...ux.intel.com>
To:     Robert Beckett <bob.beckett@...labora.com>,
        dri-devel@...ts.freedesktop.org, intel-gfx@...ts.freedesktop.org,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>
Cc:     kernel@...labora.com, Matthew Auld <matthew.auld@...el.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v8 03/10] drm/i915/ttm: only trust snooping for dgfx when
 deciding default cache_level


On 6/21/22 22:00, Robert Beckett wrote:
> By default i915_ttm_cache_level() decides I915_CACHE_LLC if HAS_SNOOP.
> This is divergent from existing backends code which only considers
> HAS_LLC.
> Testing shows that trusting snooping on gen5- is unreliable and bsw via
> ggtt mappings, so limit DGFX for now and maintain previous behaviour.
Yeah, IIRC Matthew mentioned that HAS_SNOOP() can be overridden in 
various ways, but not on DGFX, (at least not for DG1). So this looks 
correct to me.
>
> Signed-off-by: Robert Beckett <bob.beckett@...labora.com>

Reviewed-by: Thomas Hellström <thomas.hellstrom@...ux.intel.com>


> ---
>   drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
> index 4c1de0b4a10f..40249fa28a7a 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm_move.c
> @@ -46,7 +46,9 @@ static enum i915_cache_level
>   i915_ttm_cache_level(struct drm_i915_private *i915, struct ttm_resource *res,
>   		     struct ttm_tt *ttm)
>   {
> -	return ((HAS_LLC(i915) || HAS_SNOOP(i915)) &&
> +	bool can_snoop = HAS_SNOOP(i915) && IS_DGFX(i915);
> +
> +	return ((HAS_LLC(i915) || can_snoop) &&
>   		!i915_ttm_gtt_binds_lmem(res) &&
>   		ttm->caching == ttm_cached) ? I915_CACHE_LLC :
>   		I915_CACHE_NONE;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ