[Intel-gfx] [PATCH] drm/i915: Kick rcu harder to free objects
Das, Nirmoy
nirmoy.das at linux.intel.com
Thu Sep 8 19:34:04 UTC 2022
On 9/8/2022 5:11 PM, Ville Syrjälä wrote:
> On Thu, Sep 08, 2022 at 04:32:56PM +0200, Das, Nirmoy wrote:
>> Hi Ville,
>>
>>
>> I fixed a similar issue in DII but I couldn't reproduce it in drm
>>
>> http://intel-gfx-pw.fi.intel.com/patch/228850/?series=15910&rev=2.
>>
>> I wonder if that fixes the problem you are facing then I can send that
>> to drm.
> CI can tell you. It has been complaining about this for ages
Could you please share a url/failed test name. I must be searching the
wrong hw/test(https://intel-gfx-ci.01.org/tree/drm-tip/fi-ivb-3770.html).
Thanks,
Nirmoy
> without
> anyone doing anything about it.
>
>> diff --git a/drivers/gpu/drm/i915/i915_gem.c
>> b/drivers/gpu/drm/i915/i915_gem.c
>> index 7809be3a6840..5438e9277924 100644
>> --- a/drivers/gpu/drm/i915/i915_gem.c
>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>> @@ -1213,7 +1213,7 @@ void i915_gem_init_early(struct drm_i915_private
>> *dev_priv)
>>
>> void i915_gem_cleanup_early(struct drm_i915_private *dev_priv)
>> {
>> - i915_gem_drain_freed_objects(dev_priv);
>> + i915_gem_drain_workqueue(dev_priv);
>> GEM_BUG_ON(!llist_empty(&dev_priv->mm.free_list));
>> GEM_BUG_ON(atomic_read(&dev_priv->mm.free_count));
>> drm_WARN_ON(&dev_priv->drm, dev_priv->mm.shrink_count);
>>
>>
>> Regards,
>>
>> Nirmoy
>>
>> On 9/6/2022 7:46 PM, Ville Syrjala wrote:
>>> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>>>
>>> On gen3 the selftests are pretty much always tripping this:
>>> <4> [383.822424] pci 0000:00:02.0: drm_WARN_ON(dev_priv->mm.shrink_count)
>>> <4> [383.822546] WARNING: CPU: 2 PID: 3560 at drivers/gpu/drm/i915/i915_gem.c:1223 i915_gem_cleanup_early+0x96/0xb0 [i915]
>>>
>>> Looks to be due to the status page object lingering on the
>>> purge_list. Call synchronize_rcu() ahead of it to make more
>>> sure all objects have been freed.
>>>
>>> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>>> ---
>>> drivers/gpu/drm/i915/i915_gem.c | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
>>> index 0f49ec9d494a..5b61f7ad6473 100644
>>> --- a/drivers/gpu/drm/i915/i915_gem.c
>>> +++ b/drivers/gpu/drm/i915/i915_gem.c
>>> @@ -1098,6 +1098,7 @@ void i915_gem_drain_freed_objects(struct drm_i915_private *i915)
>>> flush_delayed_work(&i915->bdev.wq);
>>> rcu_barrier();
>>> }
>>> + synchronize_rcu();
>>> }
>>>
>>> /*
More information about the Intel-gfx
mailing list