From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Zhenyu Wang <zhenyuw@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: intel-gvt-dev@lists.freedesktop.org,
Jiao Pengyuan <pengyuan.jiao@intel.com>
Subject: Re: [PATCH v2 1/2] drm/i915: Add perf property support for context HW id
Date: Fri, 21 Jul 2017 14:01:01 +0100 [thread overview]
Message-ID: <f3c151f1-0421-6275-b5eb-e8152a8c5f57@intel.com> (raw)
In-Reply-To: <150063504528.29280.3933216558027843338@mail.alporthouse.com>
I think Chris' comments show this isn't actually tested.
Can you please write at least one test case for igt ?
We have a pretty long list of patches that need to land (still need
review on some patches).
I would recommend you base you patches on this :
https://github.com/djdeath/intel-gpu-tools/tree/wip/djdeath/oa-next
Once your tests are passing, I'll put them in that branch.
Thanks!
On 21/07/17 12:04, Chris Wilson wrote:
> Quoting Zhenyu Wang (2017-07-19 06:39:48)
>> +static struct i915_gem_context *
>> +lookup_context_hw_id(struct drm_i915_private *dev_priv, unsigned int hw_id)
>> +{
>> + struct i915_gem_context *ctx;
>> + int ret;
>> +
>> + ret = i915_mutex_lock_interruptible(&dev_priv->drm);
>> + if (ret)
>> + return ERR_PTR(ret);
>> +
>> + list_for_each_entry(ctx, &dev_priv->contexts.list, link) {
>> + if (!i915_gem_context_is_default(ctx))
>> + continue;
> This is still a massive what? Why ban normal contexts? Why are you not
> banning the kernel context?
>
>> +
>> + if (ctx->hw_id == hw_id) {
>> + ret = 1;
>> + i915_gem_context_get(ctx);
>> + break;
> Bad news, your reference counting is still broken. You actually need an
> i915_gem_context_get_rcu() variant for pulling from this list.
> -Chris
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-07-21 13:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-19 5:39 [PATCH v2 1/2] drm/i915: Add perf property support for context HW id Zhenyu Wang
2017-07-19 5:39 ` [PATCH v2 2/2] drm/i915/gvt: expose vGPU context hw id Zhenyu Wang
2017-07-19 6:10 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915: Add perf property support for context HW id Patchwork
2017-07-21 10:50 ` [PATCH v2 1/2] " Lionel Landwerlin
2017-07-21 11:04 ` Chris Wilson
2017-07-21 13:01 ` Lionel Landwerlin [this message]
2017-07-25 4:26 ` Zhenyu Wang
2017-07-25 11:04 ` Lionel Landwerlin
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=f3c151f1-0421-6275-b5eb-e8152a8c5f57@intel.com \
--to=lionel.g.landwerlin@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=pengyuan.jiao@intel.com \
--cc=zhenyuw@linux.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