From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-15?Q?Christian_K=F6nig?= Subject: Re: [PATCH] drm/radeon: Inline r100_mm_rreg Date: Fri, 11 Apr 2014 14:32:20 +0200 Message-ID: <5347E0D4.3040205@vodafone.de> References: <20140410160817.5275493d.cand@gmx.com> <20140410214634.ba440af5.cand@gmx.com> <5346F13B.6060604@vodafone.de> <20140411105201.57ea4a1b.cand@gmx.com> <5347A8C4.90307@vodafone.de> <20140411125417.ce34db7e.cand@gmx.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Content-Transfer-Encoding: quoted-printable Return-path: Received: from pegasos-out.vodafone.de (pegasos-out.vodafone.de [80.84.1.38]) by gabe.freedesktop.org (Postfix) with ESMTP id A8DAE6EDA4 for ; Fri, 11 Apr 2014 05:32:39 -0700 (PDT) Received: from localhost (localhost.localdomain [127.0.0.1]) by pegasos-out.vodafone.de (Rohrpostix1 Daemon) with ESMTP id 9117B260C64 for ; Fri, 11 Apr 2014 14:32:36 +0200 (CEST) Received: from pegasos-out.vodafone.de ([127.0.0.1]) by localhost (rohrpostix1.prod.vfnet.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l8tRGYY2Ppg8 for ; Fri, 11 Apr 2014 14:32:31 +0200 (CEST) In-Reply-To: <20140411125417.ce34db7e.cand@gmx.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Lauri Kasanen Cc: "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org Am 11.04.2014 11:54, schrieb Lauri Kasanen: > On Fri, 11 Apr 2014 10:33:08 +0200 > Christian K=F6nig wrote: > >>>> Actually direct register access shouldn't be necessary so often. Apart >>>> from page flips, write/read pointer updates and irq processing there >>>> shouldn't be so many of them. Could you clarify a bit more what issue >>>> you are seeing here? >>> Too much cpu usage for such a simple function. 2% makes it #2 in top-10 >>> radeon.ko functions, right after evergreen_cs_parse. For reference, #3 >>> (radeon_cs_packet_parse) is only 0.5%, one fourth of this function's >>> usage. >> I think you misunderstood me here. I do believe your numbers that it >> makes a noticeable difference. >> >> But I've did a couple of perf tests recently on SI and CIK while hacking >> on VM support, and IIRC r100_mm_rreg didn't showed up in the top 10 on >> those systems. >> >> So what puzzles me is who the hack is calling r100_mm_rreg so often that >> it makes a noticeable difference on evergreen/NI? > The biggest caller is cayman_cp_int_cntl_setup. Before inlining it took > 0.0013%, after it takes 1%. Sounds like somebody is constantly turning interrupts on and off. > This is on a Richland APU, so Aruba/Cayman. Urban Terror is an ioq3 > game with a lot of cpu-side vertex submissions. That will probably be the difference, I only tested lightsmark. Anyway, I would do like Ilia suggested and only put the else branch into = a separate, not inlined function. BTW: It's probably a good idea to do the same for the write function as = well. Christian. > - Lauri