All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Dongwon Kim <dongwon.kim@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/i915: Mark CPU cache as dirty on every transition for CPU writes
Date: Sat, 29 Apr 2017 09:43:52 +0100	[thread overview]
Message-ID: <20170429084352.GB30926@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20170428225556.GA8259@downor-Z87X-UD5H>

On Fri, Apr 28, 2017 at 03:55:56PM -0700, Dongwon Kim wrote:
> Hi Chris,
> 
> I tried this but I still see tests are failing. 
> I wanted to debug it little further to find a specific
> condition where clflush is missing but didn't have 
> enough time. I will look into this early next week.

Did you check this patch separately?

So we are still missing a transition where we need to flag the cache as
becoming dirty. And I still believe you have a
"set-cache-level(snooped); gpu write; set-cache-level(none); gpu access"
sequence. 

This patch should be marking as any write to a snooped bo as making the
cache-dirty. So we should be caching any and all transitions from snoop
to none, as that cache_dirty flag will not go away until we clflush.

And the real active ingredient of this patch is to always flush the
dirty_cache before rendering, not just if the object was in the CPU
write domain at that time.

Hmm, one thing to check is that if your userspace is not declaring some
domain access that is dirtying the cache. Or if you are using mocs that
override the cache tracking, without adjusting the PTE. If you are doing
the latter, there isn't much the kernel can do to help.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-04-29  8:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-27 14:46 [PATCH 1/2] drm/i915: Mark CPU cache as dirty on every transition for CPU writes Chris Wilson
2017-04-27 14:46 ` [PATCH 2/2] drm/i915: Store i915_gem_object_is_coherent() as a bit next to cache-dirty Chris Wilson
2017-04-27 15:07 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Mark CPU cache as dirty on every transition for CPU writes Patchwork
2017-04-28 22:55 ` [PATCH 1/2] " Dongwon Kim
2017-04-29  8:43   ` Chris Wilson [this message]
2017-05-09 21:33     ` Dongwon Kim
2017-06-01 16:59 Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170429084352.GB30926@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=dongwon.kim@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.