From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932485AbbERSuO (ORCPT ); Mon, 18 May 2015 14:50:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34704 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932235AbbERSuL (ORCPT ); Mon, 18 May 2015 14:50:11 -0400 Message-ID: <555A3461.90000@redhat.com> Date: Mon, 18 May 2015 20:50:09 +0200 From: Denys Vlasenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: =?UTF-8?B?Q2hyaXN0aWFuIEvDtm5pZw==?= CC: Alex Deucher , linux-kernel@vger.kernel.org Subject: Re: [PATCH] radeon: Deinline indirect register accessor functions References: <1431971955-31231-1-git-send-email-dvlasenk@redhat.com> <555A2A1E.9000706@amd.com> In-Reply-To: <555A2A1E.9000706@amd.com> 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 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.