All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: "Marek Olšák" <maraeo@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm/radeon: stop the leaks in cik_ib_test
Date: Wed, 16 Oct 2013 13:31:03 +0200	[thread overview]
Message-ID: <525E78F7.8070301@vodafone.de> (raw)
In-Reply-To: <CAAxE2A4k8x-FGTytrb5=cgLSFqp=SFZPHzowLd9gMFyECavpyw@mail.gmail.com>

Strange. I tested X with ~120 glxgears instances which got killed and 
restarted every 60-120 seconds for the whole night, but without any 
lockup or freeze.

What's the kernel backtrace when this happens? If I understand you 
correctly X is killable in that situation, is that right?

Please try the following:

echo 1 > 
/sys/kernel/debug/tracing/events/radeon/radeon_fence_wait_begin/enable
echo 1 > 
/sys/kernel/debug/tracing/events/radeon/radeon_fence_wait_end/enable

before starting X. And when X freezed "cat /sys/kernel/debug/tracing/trace".

Thanks,
Christian.

Am 15.10.2013 12:57, schrieb Marek Olšák:
> They are not lockups. X just freezes in GEM_WAIT. The only way to
> reproduce it is to apply the patches, use the computer and wait. It
> looks like a fence is not signalled and the process calling GEM_WAIT
> is not woken up.
>
> Marek
>
> On Tue, Oct 15, 2013 at 11:11 AM, Christian König
> <deathsimple@vodafone.de> wrote:
>> Mhm hard to say what's going wrong this time, but we probably need to fix it
>> before the final release.
>>
>> Do you have a kernel backtrace from the lockups? Or at least some way to
>> reproduce it?
>>
>> Christian.
>>
>> Am 14.10.2013 21:34, schrieb Marek Olšák:
>>
>>> Ooops, the new problem is not so rare. It has now happened to me 3
>>> times in an hour.
>>>
>>> Marek
>>>
>>> On Mon, Oct 14, 2013 at 9:13 PM, Marek Olšák <maraeo@gmail.com> wrote:
>>>> I tested this and had over 1546 lockups followed by a successful GPU
>>>> reset. Then the kernel probably crashed (judging by the fact ssh was
>>>> dead). Still, it's pretty impressive.
>>>>
>>>> There is a new problem though. The X server sometimes gets stuck in
>>>> GEM_WAIT and waits forever, even if there were no lockups before. It
>>>> occurs very rarely though. I didn't see this issue without your
>>>> patches.
>>>>
>>>> Marek
>>>>
>>>> On Mon, Oct 14, 2013 at 11:32 AM, Christian König
>>>> <deathsimple@vodafone.de> wrote:
>>>>> From: Christian König <christian.koenig@amd.com>
>>>>>
>>>>> Stop leaking IB memory and scratch register space when the test fails.
>>>>>
>>>>> Signed-off-by: Christian König <christian.koenig@amd.com>
>>>>> ---
>>>>>    drivers/gpu/drm/radeon/cik.c | 3 +++
>>>>>    1 file changed, 3 insertions(+)
>>>>>
>>>>> diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
>>>>> index b874ccd..8f393df 100644
>>>>> --- a/drivers/gpu/drm/radeon/cik.c
>>>>> +++ b/drivers/gpu/drm/radeon/cik.c
>>>>> @@ -3182,6 +3182,7 @@ int cik_ib_test(struct radeon_device *rdev, struct
>>>>> radeon_ring *ring)
>>>>>           r = radeon_ib_get(rdev, ring->idx, &ib, NULL, 256);
>>>>>           if (r) {
>>>>>                   DRM_ERROR("radeon: failed to get ib (%d).\n", r);
>>>>> +               radeon_scratch_free(rdev, scratch);
>>>>>                   return r;
>>>>>           }
>>>>>           ib.ptr[0] = PACKET3(PACKET3_SET_UCONFIG_REG, 1);
>>>>> @@ -3198,6 +3199,8 @@ int cik_ib_test(struct radeon_device *rdev, struct
>>>>> radeon_ring *ring)
>>>>>           r = radeon_fence_wait(ib.fence, false);
>>>>>           if (r) {
>>>>>                   DRM_ERROR("radeon: fence wait failed (%d).\n", r);
>>>>> +               radeon_scratch_free(rdev, scratch);
>>>>> +               radeon_ib_free(rdev, &ib);
>>>>>                   return r;
>>>>>           }
>>>>>           for (i = 0; i < rdev->usec_timeout; i++) {
>>>>> --
>>>>> 1.8.1.2
>>>>>
>>>>> _______________________________________________
>>>>> dri-devel mailing list
>>>>> dri-devel@lists.freedesktop.org
>>>>> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>>

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2013-10-16 11:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14  9:32 [PATCH 1/2] drm/radeon: stop the leaks in cik_ib_test Christian König
2013-10-14  9:32 ` [PATCH 2/2] drm/radeon: rework and fix reset detection v2 Christian König
2013-10-14 13:20   ` Dieter Nützel
2013-10-14 17:35 ` [PATCH 1/2] drm/radeon: stop the leaks in cik_ib_test Alex Deucher
2013-10-14 19:13 ` Marek Olšák
2013-10-14 19:34   ` Marek Olšák
2013-10-15  9:11     ` Christian König
2013-10-15 10:57       ` Marek Olšák
2013-10-16 11:31         ` Christian König [this message]

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=525E78F7.8070301@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=maraeo@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.