From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Zhi Wang <zhi.a.wang@intel.com>,
intel-gfx@lists.freedesktop.org,
intel-gvt-dev@lists.freedesktop.org
Cc: Ben Widawsky <benjamin.widawsky@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v13 2/5] drm/i915: Introduce private PAT management
Date: Tue, 12 Sep 2017 16:33:32 +0300 [thread overview]
Message-ID: <1505223212.4514.4.camel@linux.intel.com> (raw)
In-Reply-To: <d54d41d5-96c9-16ff-2e76-85c2d426149b@intel.com>
On Tue, 2017-09-12 at 15:20 +0800, Zhi Wang wrote:
> On 09/11/17 16:59, Joonas Lahtinen wrote:
> > On Mon, 2017-09-11 at 12:26 +0800, Zhi Wang wrote:
> > > The private PAT management is to support PPAT entry manipulation. Two
<SNIP>
> > > +static unsigned int bdw_private_pat_match(u8 src, u8 dst)
> > > +{
> > > + unsigned int score = 0;
> > > +
> > > + /* Cache attribute has to be matched. */
> > > + if (GEN8_PPAT_GET_CA(src) != GEN8_PPAT_GET_CA(dst))
> > > + return 0;
> >
> > We're not giving any points for when only cache attribute matches? Does
> > not this result in ENOSPC when we would have an entry with matching
> > "cache attribute", but no other matching entries while PPAT is full.
> >
> > so maybe score += 4 here?
> >
>
> Aiha. cache attribute of src == cache attribute of dst is mandatory
> since the mismatch of other attribute only causes performance drop, but
> mismatch of cache attribute causes problem of correctness.
Yes, that's why I suggested;
if (CA(src) != CA(dst))
return 0;
score += 4;
if (...)
score += ...
Because currently, if only the cache attribute matches (which is enough
for correctness), the score is returned as zero which is then rejected
just like if cache attribute did not match. If only cache attribute
matches, we should return non-zero, like my example above.
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-09-12 13:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-11 4:26 [PATCH v13 1/5] drm/i915: Factor out setup_private_pat() Zhi Wang
2017-09-11 4:26 ` [PATCH v13 2/5] drm/i915: Introduce private PAT management Zhi Wang
2017-09-11 8:59 ` Joonas Lahtinen
2017-09-12 7:20 ` Zhi Wang
2017-09-12 13:33 ` Joonas Lahtinen [this message]
2017-09-12 13:35 ` Wang, Zhi A
2017-09-11 4:26 ` [PATCH v13 3/5] drm/i915: Remove the "INDEX" suffix from PPAT marcos Zhi Wang
2017-09-11 4:26 ` [PATCH v13 4/5] drm/i915: Do not allocate unused PPAT entries Zhi Wang
2017-09-11 9:16 ` Joonas Lahtinen
2017-09-11 4:26 ` [PATCH v13 5/5] drm/i915/selftests: Introduce live tests of private PAT management Zhi Wang
2017-09-11 4:50 ` ✗ Fi.CI.BAT: warning for series starting with [v13,1/5] drm/i915: Factor out setup_private_pat() Patchwork
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=1505223212.4514.4.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=benjamin.widawsky@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=rodrigo.vivi@intel.com \
--cc=zhi.a.wang@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox