From: bugzilla-daemon@freedesktop.org Subject: [Bug 110781] Radeon: heavy r300 performance drop regression between 11.x and 19.x Date: Fri, 07 Jun 2019 19:23:35 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1470142277==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B5F889E8C for ; Fri, 7 Jun 2019 19:23:35 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1470142277== Content-Type: multipart/alternative; boundary="15599354150.1cDF.13839" Content-Transfer-Encoding: 7bit --15599354150.1cDF.13839 Date: Fri, 7 Jun 2019 19:23:35 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D110781 --- Comment #57 from Richard Thier --- Hello everyone! I have found one more place where we can end up calling extra ioctls for GEM_CREATE. I remember telling you above after the very first proposed patc= h of Marek, that "Interesting to me is that the CREATE call number is still high= er in strace output than how it was originally before the first slowdown" I went on to find the cause because I was using his patch when bisecting the minor issue and this makes it really hard to spot the minor issue I mentined earlier. So I decided to find out what causes the 600-700 CREATE calls despite the performance seems fast. This is what I did: /* Shared resources don't use cached heaps. */ if (use_reusable_pool) { int heap =3D radeon_get_heap_index(domain, flags); assert(heap >=3D 0 && heap < RADEON_MAX_CACHED_HEAPS); usage =3D 1 << heap; /* Only set one usage bit for each heap. */ pb_cache_bucket =3D radeon_get_pb_cache_bucket_index(heap); assert(pb_cache_bucket < ARRAY_SIZE(ws->bo_cache.buckets)); bo =3D radeon_bo(pb_cache_reclaim_buffer(&ws->bo_cache, size, align= ment, usage, pb_cache_bucket)); if (bo)=20 return &bo->base; } else { // first only logs where here fprintf(stderr, "1 KULAKVA!!!\n"); fprintf(stderr, "2 KULAKVA!!!\n"); fprintf(stderr, "3 KULAKVA!!!\n"); // this segfault got added later uint kula =3D 0;=20 int *kulakva =3D (int*)kula; *kulakva=3D42; }=20=20=20=20 I saw that still I can get to the code path where "KULAKVA" gets printed, w= hile in the very original code of course this was never the case ever as the who= le if and the bool variable if using reusable pools or not was not existing ye= t. I am now recompiling with debug symbols so that running glxgears with gdb w= ill hopefully fail at the last line of the else clause and tell me a backtrace where I am coming from ;-) --=20 You are receiving this mail because: You are the assignee for the bug.= --15599354150.1cDF.13839 Date: Fri, 7 Jun 2019 19:23:35 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated

Comme= nt # 57 on bug 11078= 1 from = Richard Thier
Hello everyone!

I have found one more place where we can end up calling extra ioctls for
GEM_CREATE. I remember telling you above after the very first proposed patc=
h of
Marek, that "Interesting to me is that the CREATE call number is still=
 higher
in strace output than how it was originally before the first slowdown"

I went on to find the cause because I was using his patch when bisecting the
minor issue and this makes it really hard to spot the minor issue I mentined
earlier.

So I decided to find out what causes the 600-700 CREATE calls despite the
performance seems fast.

This is what I did:

    /* Shared resources don't use cached heaps. */
    if (use_reusable_pool) {
        int heap =3D radeon_get_heap_index(domain, flags);
        assert(heap >=3D 0 && heap < RADEON_MAX_CACHED_HEAPS);
        usage =3D 1 << heap; /* Only set one usage bit for each heap.=
 */

        pb_cache_bucket =3D radeon_get_pb_cache_bucket_index(heap);
        assert(pb_cache_bucket < ARRAY_SIZE(ws->bo_cache.buckets));

        bo =3D radeon_bo(pb_cache_reclaim_buffer(&ws->bo_cache, size=
, alignment,
                                               usage, pb_cache_bucket));
        if (bo)=20
            return &bo->base;
    } else {
        // first only logs where here
        fprintf(stderr, "1 KULAKVA!!!\n");
        fprintf(stderr, "2 KULAKVA!!!\n");
        fprintf(stderr, "3 KULAKVA!!!\n");
        // this segfault got added later
        uint kula =3D 0;=20
        int *kulakva =3D (int*)kula;
        *kulakva=3D42;
    }=20=20=20=20

I saw that still I can get to the code path where "KULAKVA" gets =
printed, while
in the very original code of course this was never the case ever as the who=
le
if and the bool variable if using reusable pools or not was not existing ye=
t.

I am now recompiling with debug symbols so that running glxgears with gdb w=
ill
hopefully fail at the last line of the else clause and tell me a backtrace
where I am coming from ;-)


You are receiving this mail because:
  • You are the assignee for the bug.
= --15599354150.1cDF.13839-- --===============1470142277== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============1470142277==--