[PATCH 1/3] drm/radeon: stop poisoning the GART TLB

Michel Dänzer michel at daenzer.net
Mon Jun 23 23:49:45 PDT 2014


On 23.06.2014 18:56, Christian König wrote:
> Am 23.06.2014 10:15, schrieb Michel Dänzer:
>> On 19.06.2014 18:45, Christian König wrote:
>>
>>> I think even when we revert to the old code we have a couple of unsolved
>>> problems with the VM support or in the driver in general where we should
>>> try to understand the underlying reason for it instead of applying more
>>> workarounds.
>> I'm not suggesting applying more workarounds but going back to a known
>> more stable state. It seems like we've maneuvered ourselves to a rather
>> uncomfortable position from there, with no clear way to a better place.
>> But if we basically started from the 3.14 state again, we have a few
>> known hurdles like mine and Marek's Bonaire etc. which we know any
>> further improvements will have to pass before they can be considered for
>> general consumption.
> 
> Yeah agree, especially on the uncomfortable position.
> 
> Please try with the two attached patches applied on top of 3.15 and
> retest. They should revert back to the old implementation.

Unfortunately, X fails to start with these, see the attached excerpt
from dmesg.


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer
-------------- next part --------------
[    5.401968] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.402095] radeon 0000:01:00.0: still active bo inside vm
[    5.402132] 
[    5.402141] ======================================================
[    5.402171] [ INFO: possible circular locking dependency detected ]
[    5.402202] 3.15.0 #133 Tainted: G           O 
[    5.402225] -------------------------------------------------------
[    5.402251] Xorg/855 is trying to acquire lock:
[    5.402272]  (reservation_ww_class_mutex){+.+.+.}, at: [<ffffffffa03387f7>] radeon_vm_fini+0xcf/0x1b6 [radeon]
[    5.402340] 
[    5.402340] but task is already holding lock:
[    5.402366]  (&vm->mutex){+.+...}, at: [<ffffffffa0338762>] radeon_vm_fini+0x3a/0x1b6 [radeon]
[    5.402424] 
[    5.402424] which lock already depends on the new lock.
[    5.402424] 
[    5.402463] 
[    5.402463] the existing dependency chain (in reverse order) is:
[    5.402500] 
[    5.402500] -> #1 (&vm->mutex){+.+...}:
[    5.402528]        [<ffffffff81076fe0>] lock_acquire+0xa1/0x111
[    5.402561]        [<ffffffff813c2dc8>] mutex_lock_nested+0x72/0x3c6
[    5.402597]        [<ffffffffa0337eb3>] radeon_vm_bo_add+0x7b/0xbd [radeon]
[    5.402638]        [<ffffffffa029c522>] radeon_driver_open_kms+0xa0/0x174 [radeon]
[    5.402679]        [<ffffffffa01b57b7>] drm_open+0x230/0x456 [drm]
[    5.402717]        [<ffffffffa01b5a8a>] drm_stub_open+0xad/0xde [drm]
[    5.402755]        [<ffffffff8113049f>] chrdev_open+0x143/0x169
[    5.402792]        [<ffffffff8112b6e5>] do_dentry_open+0x223/0x238
[    5.402824]        [<ffffffff8112b728>] finish_open+0x2e/0x38
[    5.402854]        [<ffffffff811381f4>] do_last+0x846/0xa01
[    5.402886]        [<ffffffff811385e4>] path_openat+0x235/0x4ef
[    5.402917]        [<ffffffff811399c1>] do_filp_open+0x35/0x7a
[    5.402948]        [<ffffffff8112c135>] do_sys_open+0x6b/0xfa
[    5.402975]        [<ffffffff8112c1dd>] SyS_open+0x19/0x1b
[    5.403004]        [<ffffffff813cbb22>] system_call_fastpath+0x16/0x1b
[    5.403038] 
[    5.403038] -> #0 (reservation_ww_class_mutex){+.+.+.}:
[    5.403071]        [<ffffffff81076a0e>] __lock_acquire+0xae5/0xd9c
[    5.403103]        [<ffffffff81076fe0>] lock_acquire+0xa1/0x111
[    5.403132]        [<ffffffff813c392c>] mutex_lock_interruptible_nested+0x72/0x3d5
[    5.403168]        [<ffffffffa03387f7>] radeon_vm_fini+0xcf/0x1b6 [radeon]
[    5.403212]        [<ffffffffa029c5b5>] radeon_driver_open_kms+0x133/0x174 [radeon]
[    5.403253]        [<ffffffffa01b57b7>] drm_open+0x230/0x456 [drm]
[    5.403289]        [<ffffffffa01b5a8a>] drm_stub_open+0xad/0xde [drm]
[    5.403325]        [<ffffffff8113049f>] chrdev_open+0x143/0x169
[    5.403356]        [<ffffffff8112b6e5>] do_dentry_open+0x223/0x238
[    5.403389]        [<ffffffff8112b728>] finish_open+0x2e/0x38
[    5.403417]        [<ffffffff811381f4>] do_last+0x846/0xa01
[    5.403446]        [<ffffffff811385e4>] path_openat+0x235/0x4ef
[    5.403478]        [<ffffffff811399c1>] do_filp_open+0x35/0x7a
[    5.403508]        [<ffffffff8112c135>] do_sys_open+0x6b/0xfa
[    5.403537]        [<ffffffff8112c1dd>] SyS_open+0x19/0x1b
[    5.403567]        [<ffffffff813cbb22>] system_call_fastpath+0x16/0x1b
[    5.403597] 
[    5.403597] other info that might help us debug this:
[    5.403597] 
[    5.403632]  Possible unsafe locking scenario:
[    5.403632] 
[    5.403660]        CPU0                    CPU1
[    5.404874]        ----                    ----
[    5.406077]   lock(&vm->mutex);
[    5.407250]                                lock(reservation_ww_class_mutex);
[    5.408449]                                lock(&vm->mutex);
[    5.409601]   lock(reservation_ww_class_mutex);
[    5.410759] 
[    5.410759]  *** DEADLOCK ***
[    5.410759] 
[    5.414095] 2 locks held by Xorg/855:
[    5.415180]  #0:  (drm_global_mutex){+.+.+.}, at: [<ffffffffa01b5a1a>] drm_stub_open+0x3d/0xde [drm]
[    5.416333]  #1:  (&vm->mutex){+.+...}, at: [<ffffffffa0338762>] radeon_vm_fini+0x3a/0x1b6 [radeon]
[    5.417487] 
[    5.417487] stack backtrace:
[    5.419659] CPU: 2 PID: 855 Comm: Xorg Tainted: G           O  3.15.0 #133
[    5.420762] Hardware name: System manufacturer System Product Name/A88X-PRO, BIOS 1001 04/01/2014
[    5.421898]  0000000000000000 ffff88021150b9a0 ffffffff813c03cc ffffffff81fad2d0
[    5.423030]  ffff88021150b9e0 ffffffff813bda7b ffff88020fc7ca10 ffff88020fc7ca10
[    5.424129]  ffff88020fc7d338 0000000000000002 ffff88020fc7d370 0000000000000002
[    5.425225] Call Trace:
[    5.426335]  [<ffffffff813c03cc>] dump_stack+0x4d/0x66
[    5.427411]  [<ffffffff813bda7b>] print_circular_bug+0x1f6/0x204
[    5.428465]  [<ffffffff81076a0e>] __lock_acquire+0xae5/0xd9c
[    5.429540]  [<ffffffff81008972>] ? native_sched_clock+0x3a/0x3c
[    5.430608]  [<ffffffff81076fe0>] lock_acquire+0xa1/0x111
[    5.431710]  [<ffffffffa03387f7>] ? radeon_vm_fini+0xcf/0x1b6 [radeon]
[    5.432809]  [<ffffffff813c392c>] mutex_lock_interruptible_nested+0x72/0x3d5
[    5.433903]  [<ffffffffa03387f7>] ? radeon_vm_fini+0xcf/0x1b6 [radeon]
[    5.434988]  [<ffffffff812a3698>] ? dev_err+0x57/0x59
[    5.436096]  [<ffffffffa03387f7>] ? radeon_vm_fini+0xcf/0x1b6 [radeon]
[    5.437147]  [<ffffffffa03387f7>] radeon_vm_fini+0xcf/0x1b6 [radeon]
[    5.438204]  [<ffffffffa029c5b5>] radeon_driver_open_kms+0x133/0x174 [radeon]
[    5.439254]  [<ffffffffa01b57b7>] drm_open+0x230/0x456 [drm]
[    5.440354]  [<ffffffffa01b5a8a>] drm_stub_open+0xad/0xde [drm]
[    5.441425]  [<ffffffff8113049f>] chrdev_open+0x143/0x169
[    5.442485]  [<ffffffff8113035c>] ? cdev_put+0x1e/0x1e
[    5.443551]  [<ffffffff8112b6e5>] do_dentry_open+0x223/0x238
[    5.444604]  [<ffffffff8112b728>] finish_open+0x2e/0x38
[    5.445676]  [<ffffffff811381f4>] do_last+0x846/0xa01
[    5.446740]  [<ffffffff811385e4>] path_openat+0x235/0x4ef
[    5.447811]  [<ffffffff811399c1>] do_filp_open+0x35/0x7a
[    5.448899]  [<ffffffff813c53b0>] ? _raw_spin_unlock+0x22/0x2d
[    5.449993]  [<ffffffff81143aa5>] ? __alloc_fd+0xee/0xfd
[    5.451061]  [<ffffffff8112c135>] do_sys_open+0x6b/0xfa
[    5.452121]  [<ffffffff8112c1dd>] SyS_open+0x19/0x1b
[    5.453186]  [<ffffffff813cbb22>] system_call_fastpath+0x16/0x1b
[    5.587862] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.587868] radeon 0000:01:00.0: still active bo inside vm
[    5.587898] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.587901] radeon 0000:01:00.0: still active bo inside vm
[    5.587971] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.587974] radeon 0000:01:00.0: still active bo inside vm
[    5.588009] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.588012] radeon 0000:01:00.0: still active bo inside vm
[    5.696557] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.696562] radeon 0000:01:00.0: still active bo inside vm
[    5.696598] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.696601] radeon 0000:01:00.0: still active bo inside vm
[    5.696637] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.696640] radeon 0000:01:00.0: still active bo inside vm
[    5.696663] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.696665] radeon 0000:01:00.0: still active bo inside vm
[    5.802864] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.802869] radeon 0000:01:00.0: still active bo inside vm
[    5.802904] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.802906] radeon 0000:01:00.0: still active bo inside vm
[    5.802973] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.802975] radeon 0000:01:00.0: still active bo inside vm
[    5.803003] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.803006] radeon 0000:01:00.0: still active bo inside vm
[    5.917046] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.917053] radeon 0000:01:00.0: still active bo inside vm
[    5.917109] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.917113] radeon 0000:01:00.0: still active bo inside vm
[    5.917181] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.917185] radeon 0000:01:00.0: still active bo inside vm
[    5.917221] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    5.917225] radeon 0000:01:00.0: still active bo inside vm
[    6.025320] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    6.025326] radeon 0000:01:00.0: still active bo inside vm
[    6.025372] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    6.025376] radeon 0000:01:00.0: still active bo inside vm
[    6.025439] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    6.025442] radeon 0000:01:00.0: still active bo inside vm
[    6.025479] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    6.025482] radeon 0000:01:00.0: still active bo inside vm
[    6.084335] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    6.084342] radeon 0000:01:00.0: still active bo inside vm
[    6.084398] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    6.084404] radeon 0000:01:00.0: still active bo inside vm
[    6.084476] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    6.084480] radeon 0000:01:00.0: still active bo inside vm
[    6.084520] radeon 0000:01:00.0: bo ffff8800db841000 va 0x00000000 conflict with (bo ffff8800db841000 0x00100000 0x00200000)
[    6.084525] radeon 0000:01:00.0: still active bo inside vm


More information about the dri-devel mailing list