From: Kenneth Graunke <kenneth.w.graunke@intel.com>
To: David Weinehall <david.weinehall@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Update MOCS settings for gen 9
Date: Thu, 04 May 2017 09:51:58 -0700 [thread overview]
Message-ID: <3501909.CEzjrhRMEy@eiger> (raw)
In-Reply-To: <20170504144721.5pdy6dnslgujfhab@boom>
[-- Attachment #1.1: Type: text/plain, Size: 4517 bytes --]
On Thursday, May 4, 2017 7:47:21 AM PDT David Weinehall wrote:
> On Thu, May 04, 2017 at 10:35:33AM +0200, Arkadiusz Hiler wrote:
> > Thanks for rephrasing - that's exactly what I am concerned with.
> >
> > Did you just use the MediaSDK as it is - meaning that MOCS entries
> > beyond the set of the 3 we have defined had been naively utilized?
> >
> > If that's the case it is probably the cause of the performance
> > difference - everything beyond "the 3" means UNCACHED.
> >
> > Can you try changing MediaSDK to only use entries that are already in?
> > How the performance differs in that case?
>
> We're benchmarking using upstream MediaSDK without changes, since that's
> the only thing that's relevant. Customising benchmarks to get better
> results isn't really an acceptable solution :)
>
> Obviously fixing MediaSDK upstream is a different story, in case one of
> the three pre-defined entries we have turns out to be the best possible
> MOCS-settings for that workload.
You're right about customizing benchmarks, but...
MediaSDK is not a benchmark. If I'm not mistaken, it's a userspace
driver produced by Intel engineers, one which Intel has the full
capability to change. What you're saying is that Intel's MediaSDK
engineers are unwilling to change their software to provide better
performance for their Linux users.
That's pretty mental.
We don't warp the core operating system to work around userspace
software simply because they don't want to change it.
This isn't about open vs. closed or internal vs. public projects,
either. I work on a public userspace driver for Intel graphics.
If I sent a kernel patch, the kernel developers would ask me the
exact same questions, to justify my new additions:
1. Is your userspace actually using all these new additions?
If not, which ones are you using?
They would ask me to drop anything I wasn't actually using
yet, because speculatively adding things to the kernel that
we have to maintain backwards compatibility for has caused
both kernel and userspace developers a lot of trouble.
2. Are you sure that you need them all? Is there a simpler
solution - are some existing things good enough? What's
the additional benefit of each new addition?
I would have to answer these questions to the satisfaction of the
kernel developers before they would even consider taking my patch.
You keep pointing to your large performance improvement, but all it's
shown is that actually using the GPU cache is faster than having a
broken userspace driver explicitly set everything to uncached. Many
people have pointed this out.
Arek and Tvrtko have good suggestions. I don't think you're going
to get anywhere with this until you demonstrate that the new MOCS
entries provide some non-zero value over using the existing WB entry.
Here are a couple more data points:
1. We likely can't implement the documented "MOCS Version 1"
table as is.
The kernel exposes existing entries with specific semantics.
Changing their meaning would introduce a backwards-incompatible
change that would likely regress the performance of existing
userspace. This is almost certainly unacceptable - our customers,
distro partners, users, and even people like Linus Torvalds will
suffer and complain loudly.
We could add the new entries at an offset - i.e. leave the existing
3 entries, and append the rest after that. But that would require
changing userspace that assumes the Windows tables, such as MediaSDK
(they would have to add 3 to their MOCS indexes). At which point,
we're changing them, so...the "runs unaltered" argument falls over.
2. The docs finally contain "recommended MOCS settings" - i.e. where
to cache various types of objects, and at what age. However, I
believe those recommendations can be implemented with 1-2 new table
entries and a PTE change to be eLLC-only by default. Most of the
table is completely unnecessary to implement the recommendations.
I personally would like to try implementing their recommended
settings in my driver. I have not had time yet, but plan to try.
I'm very glad to see the Windows MOCS recommendations documented.
I'd been asking for that information for literally years. If we'd
gotten it earlier, a lot of mess could have been avoided. For future
platforms, we may want to coordinate and use the same table. But
Gen9 has been shipping for ages, and we don't have that luxury.
--Ken
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-05-04 16:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-26 15:00 [PATCH] drm/i915: Update MOCS settings for gen 9 David Weinehall
2017-04-26 17:25 ` Francisco Jerez
2017-04-27 14:55 ` Arkadiusz Hiler
2017-04-27 15:30 ` David Weinehall
2017-04-27 16:23 ` Chris Wilson
2017-05-04 8:35 ` Arkadiusz Hiler
2017-05-04 8:53 ` Tvrtko Ursulin
2017-05-04 9:21 ` Eero Tamminen
2017-05-04 9:34 ` Tvrtko Ursulin
2017-05-04 14:47 ` David Weinehall
2017-05-04 16:51 ` Kenneth Graunke [this message]
2017-05-04 20:32 ` Ewins, Jon
2017-05-05 2:46 ` Dmitry Rogozhkin
2017-05-05 11:31 ` Arkadiusz Hiler
2017-05-05 11:49 ` Chris Wilson
2017-05-05 12:53 ` Arkadiusz Hiler
2017-05-05 15:44 ` Kenneth Graunke
2017-05-05 16:21 ` Dmitry Rogozhkin
2017-05-05 19:36 ` Kenneth Graunke
2017-05-08 8:09 ` Daniel Vetter
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=3501909.CEzjrhRMEy@eiger \
--to=kenneth.w.graunke@intel.com \
--cc=david.weinehall@linux.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.