Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932473AbbERTWz (ORCPT ); Mon, 18 May 2015 15:22:55 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:35794 "EHLO mail-ob0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751177AbbERTWu convert rfc822-to-8bit (ORCPT ); Mon, 18 May 2015 15:22:50 -0400 MIME-Version: 1.0 In-Reply-To: <555A37CC.2020809@amd.com> References: <1431971955-31231-1-git-send-email-dvlasenk@redhat.com> <555A2A1E.9000706@amd.com> <555A3461.90000@redhat.com> <555A37CC.2020809@amd.com> Date: Mon, 18 May 2015 15:22:49 -0400 X-Google-Sender-Auth: udzRoztCrTDmfOckHVo7ga2rOdM Message-ID: Subject: Re: [PATCH] radeon: Deinline indirect register accessor functions From: Ilia Mirkin To: =?UTF-8?Q?Christian_K=C3=B6nig?= Cc: Denys Vlasenko , Alex Deucher , "linux-kernel@vger.kernel.org" , Lauri Kasanen , "dri-devel@lists.freedesktop.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1660 Lines: 49 On Mon, May 18, 2015 at 3:04 PM, Christian König wrote: > On 18.05.2015 20:50, Denys Vlasenko wrote: >> >> On 05/18/2015 08:06 PM, Christian König wrote: >>> >>> I'm actually surprised how often people come along with that. The last >>> time we tried this it caused a noticeable performance drop. >>> >>> Basic problem is that this line: >>>> >>>> + if ((reg < rdev->rmmio_size || reg < RADEON_MIN_MMIO_SIZE) && >>>> !always_indirect) >>> >>> optimizes away in most of the cases which reduces the call to a readl >>> which is way faster than the spinlock path. >>> >>> So this is a NAK, >> >> >> Fair enough. >> >> I'm preparing a v2 where the fast branch of r100_mm_{r,w}reg() will stay >> inlined. >> > Sounds good to be, but IIRC that was suggested the last time this came up as > well. You might just want to google a bit why it wasn't done like this > before submitting the patch for review. > > BTW: Please CC the dri-devel list as well, cause not everybody is reading on > linux-kernel. http://lists.freedesktop.org/archives/dri-devel/2014-April/057349.html ... http://lists.freedesktop.org/archives/dri-devel/2014-April/057520.html Actually Lauri was *inlining* the function, not out-of-lining. I made the suggestion (and you agreed at the time) that the slow-path should be kept out of line, but apparently there was still high CPU overhead as a result? Cheers, -ilia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/