From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Michel_D=E4nzer?= Subject: Re: [PATCH 1/3] drm/radeon: stop poisoning the GART TLB Date: Tue, 24 Jun 2014 15:49:45 +0900 Message-ID: <53A91F89.7090504@daenzer.net> References: <1401888598-1961-1-git-send-email-deathsimple@vodafone.de> <5398218A.4040104@vodafone.de> <53998D99.6050008@vodafone.de> <539B1CA0.6010600@vodafone.de> <539D9601.8090308@vodafone.de> <53A2415D.6020808@daenzer.net> <53A2B155.4000001@vodafone.de> <53A7E21E.1000000@daenzer.net> <53A7F9E1.8080700@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070008090202050507060707" Return-path: Received: from mail.gna.ch (darkcity.gna.ch [195.226.6.51]) by gabe.freedesktop.org (Postfix) with ESMTP id 904D5892FD for ; Mon, 23 Jun 2014 23:49:53 -0700 (PDT) In-Reply-To: <53A7F9E1.8080700@amd.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: =?ISO-8859-1?Q?Christian_K=F6nig?= , Alex Deucher Cc: dri-devel List-Id: dri-devel@lists.freedesktop.org This is a multi-part message in MIME format. --------------070008090202050507060707 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 23.06.2014 18:56, Christian K=F6nig wrote: > Am 23.06.2014 10:15, schrieb Michel D=E4nzer: >> On 19.06.2014 18:45, Christian K=F6nig wrote: >> >>> I think even when we revert to the old code we have a couple of unsol= ved >>> problems with the VM support or in the driver in general where we sho= uld >>> try to understand the underlying reason for it instead of applying mo= re >>> 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 rathe= r >> 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 f= or >> general consumption. >=20 > Yeah agree, especially on the uncomfortable position. >=20 > 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. --=20 Earthling Michel D=E4nzer | http://www.amd.co= m Libre software enthusiast | Mesa and X developer --------------070008090202050507060707 Content-Type: text/plain; charset=UTF-8; name="dmesg.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="dmesg.txt" [ 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: [] radeon_vm_fini+0xcf/0x1b6 [radeon] [ 5.402340] [ 5.402340] but task is already holding lock: [ 5.402366] (&vm->mutex){+.+...}, at: [] 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] [] lock_acquire+0xa1/0x111 [ 5.402561] [] mutex_lock_nested+0x72/0x3c6 [ 5.402597] [] radeon_vm_bo_add+0x7b/0xbd [radeon] [ 5.402638] [] radeon_driver_open_kms+0xa0/0x174 [radeon] [ 5.402679] [] drm_open+0x230/0x456 [drm] [ 5.402717] [] drm_stub_open+0xad/0xde [drm] [ 5.402755] [] chrdev_open+0x143/0x169 [ 5.402792] [] do_dentry_open+0x223/0x238 [ 5.402824] [] finish_open+0x2e/0x38 [ 5.402854] [] do_last+0x846/0xa01 [ 5.402886] [] path_openat+0x235/0x4ef [ 5.402917] [] do_filp_open+0x35/0x7a [ 5.402948] [] do_sys_open+0x6b/0xfa [ 5.402975] [] SyS_open+0x19/0x1b [ 5.403004] [] system_call_fastpath+0x16/0x1b [ 5.403038] [ 5.403038] -> #0 (reservation_ww_class_mutex){+.+.+.}: [ 5.403071] [] __lock_acquire+0xae5/0xd9c [ 5.403103] [] lock_acquire+0xa1/0x111 [ 5.403132] [] mutex_lock_interruptible_nested+0x72/0x3d5 [ 5.403168] [] radeon_vm_fini+0xcf/0x1b6 [radeon] [ 5.403212] [] radeon_driver_open_kms+0x133/0x174 [radeon] [ 5.403253] [] drm_open+0x230/0x456 [drm] [ 5.403289] [] drm_stub_open+0xad/0xde [drm] [ 5.403325] [] chrdev_open+0x143/0x169 [ 5.403356] [] do_dentry_open+0x223/0x238 [ 5.403389] [] finish_open+0x2e/0x38 [ 5.403417] [] do_last+0x846/0xa01 [ 5.403446] [] path_openat+0x235/0x4ef [ 5.403478] [] do_filp_open+0x35/0x7a [ 5.403508] [] do_sys_open+0x6b/0xfa [ 5.403537] [] SyS_open+0x19/0x1b [ 5.403567] [] 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: [] drm_stub_open+0x3d/0xde [drm] [ 5.416333] #1: (&vm->mutex){+.+...}, at: [] 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] [] dump_stack+0x4d/0x66 [ 5.427411] [] print_circular_bug+0x1f6/0x204 [ 5.428465] [] __lock_acquire+0xae5/0xd9c [ 5.429540] [] ? native_sched_clock+0x3a/0x3c [ 5.430608] [] lock_acquire+0xa1/0x111 [ 5.431710] [] ? radeon_vm_fini+0xcf/0x1b6 [radeon] [ 5.432809] [] mutex_lock_interruptible_nested+0x72/0x3d5 [ 5.433903] [] ? radeon_vm_fini+0xcf/0x1b6 [radeon] [ 5.434988] [] ? dev_err+0x57/0x59 [ 5.436096] [] ? radeon_vm_fini+0xcf/0x1b6 [radeon] [ 5.437147] [] radeon_vm_fini+0xcf/0x1b6 [radeon] [ 5.438204] [] radeon_driver_open_kms+0x133/0x174 [radeon] [ 5.439254] [] drm_open+0x230/0x456 [drm] [ 5.440354] [] drm_stub_open+0xad/0xde [drm] [ 5.441425] [] chrdev_open+0x143/0x169 [ 5.442485] [] ? cdev_put+0x1e/0x1e [ 5.443551] [] do_dentry_open+0x223/0x238 [ 5.444604] [] finish_open+0x2e/0x38 [ 5.445676] [] do_last+0x846/0xa01 [ 5.446740] [] path_openat+0x235/0x4ef [ 5.447811] [] do_filp_open+0x35/0x7a [ 5.448899] [] ? _raw_spin_unlock+0x22/0x2d [ 5.449993] [] ? __alloc_fd+0xee/0xfd [ 5.451061] [] do_sys_open+0x6b/0xfa [ 5.452121] [] SyS_open+0x19/0x1b [ 5.453186] [] 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 --------------070008090202050507060707 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --------------070008090202050507060707--