Received: by 10.213.65.68 with SMTP id h4csp34184imn; Thu, 15 Mar 2018 08:46:04 -0700 (PDT) X-Google-Smtp-Source: AG47ELuz4taTtXctHGKPD3QFba5OSvEjAeBrUK7kEqz2X+kAnlxmJf1pPTpaE2B7AH02taxCHE8w X-Received: by 2002:a17:902:7843:: with SMTP id e3-v6mr8766256pln.83.1521128764533; Thu, 15 Mar 2018 08:46:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521128764; cv=none; d=google.com; s=arc-20160816; b=SY4DBddVVTIq/w7UBIEL09+zPMsk4VScydKI0DrsMx1O9t2WTGCfyKMN1rdh0fjW3y Hwy82vuBvvo+oSgq6dYR2IRnQ/kLzdUQIlY2WoqjXP23ek3YDWRxdaUDDQkdoiSH+zWf qNjOU5Kx8Bxu98Bov1GDs6105k8pTu93SwtQVicLQRWkzUuTfvuj4ii62o5IAodBEn25 C0/SaG+UwC4h8Ht54ZE2no7iUw7An5UoWCjmNeqUsqtJ0N7VCPppgc9f36MFznEO3vXe khJo7Iauo5Ucrw6CnkLeBUk2s35cFKaMh6K1QkRq9nSrkL1X3QynRovv/TsKzQ3dQgWL erAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=GpZJIaW2ghIbfzVQn0yl3e0qkMgmyKYrt+2VXKjrHQw=; b=C6ZZrCEkBh5NWjmhlr1fSwiumLn6ZbXdqVWnVvMcDUUITe2KYvT41DYSI3jXqSDCUb P9UeiQK8AKntsDXon7aQG/UAg4zDlNA1FBIJD1IX4f4v5jghsPf0Yylq/C093++LqsQq ELSt3JoZ7iG0sqcx7eGCrtmlUvjCMhiz4EtBTaObNOg4ahupNh6ZEAeNqp2oxcfQjfBT 8TmuZvcoSWibO4YteFsjODp8ep1uNTVHUAnr3xypt/aQ0xPi0L4Nk4FvbqgNSBHqBYS5 yBPs/Zal0O9dgU58jRj4KCmxxp+jxlmGx3ijbu/qpzZZ3iRqtTvE5hTGajclgLTIjsbD b1EA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t19-v6si4129069plo.742.2018.03.15.08.45.50; Thu, 15 Mar 2018 08:46:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932526AbeCOPoP (ORCPT + 99 others); Thu, 15 Mar 2018 11:44:15 -0400 Received: from smtprelay0090.hostedemail.com ([216.40.44.90]:37591 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932227AbeCOPoN (ORCPT ); Thu, 15 Mar 2018 11:44:13 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay06.hostedemail.com (Postfix) with ESMTP id 910761801FF3E; Thu, 15 Mar 2018 15:44:12 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:541:599:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1542:1593:1594:1605:1711:1730:1747:1777:1792:2393:2553:2559:2562:2691:2828:3138:3139:3140:3141:3142:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:4470:4559:5007:7808:7903:8603:8660:9040:10004:10400:10848:11232:11658:11914:12296:12555:12663:12740:12895:12986:13148:13161:13163:13229:13230:13439:13894:14096:14097:14181:14659:14721:21080:21451:21611:21627:30012:30051:30054:30070:30090:30091,0,RBL:47.151.150.235:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:21,LUA_SUMMARY:none X-HE-Tag: coat43_5e31a9a107300 X-Filterd-Recvd-Size: 3945 Received: from XPS-9350 (unknown [47.151.150.235]) (Authenticated sender: joe@perches.com) by omf12.hostedemail.com (Postfix) with ESMTPA; Thu, 15 Mar 2018 15:44:07 +0000 (UTC) Message-ID: <1521128645.22221.18.camel@perches.com> Subject: Re: [PATCH] drm: Reduce object size of DRM_ERROR and DRM_DEBUG uses From: Joe Perches To: Ville =?ISO-8859-1?Q?Syrj=E4l=E4?= Cc: Maarten Lankhorst , Gustavo Padovan , Sean Paul , David Airlie , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Date: Thu, 15 Mar 2018 08:44:05 -0700 In-Reply-To: <20180315153734.GT5453@intel.com> References: <016b5cb84cede20fd0f91ed6965421d99fd5f2ce.1520978414.git.joe@perches.com> <20180315133026.GR5453@intel.com> <1b50f5d8-97a6-2442-34bb-2782c35505fd@linux.intel.com> <20180315150524.GS5453@intel.com> <1521127073.22221.13.camel@perches.com> <20180315153734.GT5453@intel.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-03-15 at 17:37 +0200, Ville Syrj?l? wrote: > On Thu, Mar 15, 2018 at 08:17:53AM -0700, Joe Perches wrote: > > On Thu, 2018-03-15 at 17:05 +0200, Ville Syrj?l? wrote: > > > On Thu, Mar 15, 2018 at 03:04:52PM +0100, Maarten Lankhorst wrote: > > > > Op 15-03-18 om 14:30 schreef Ville Syrj?l?: > > > > > On Tue, Mar 13, 2018 at 03:02:15PM -0700, Joe Perches wrote: > > > > > > drm_printk is used for both DRM_ERROR and DRM_DEBUG with unnecessary > > > > > > arguments that can be removed by creating separate functins. > > > > > > > > > > > > Create specific functions for these calls to reduce x86/64 defconfig > > > > > > size by ~20k. > > > > > > > > > > > > Modify the existing macros to use the specific calls. > > > > > > > > > > > > new: > > > > > > $ size -t drivers/gpu/drm/built-in.a | tail -1 > > > > > > 1876562 44542 995 1922099 1d5433 (TOTALS) > > > > > > > > > > > > old: > > > > > > $ size -t drivers/gpu/drm/built-in.a | tail -1 > > > > > > 1897565 44542 995 1943102 1da63e (TOTALS) > > > > > > > > > > > > Miscellanea: > > > > > > > > > > > > o intel_display requires a change to use the specific calls. > > > > > > > > > > How much would we lose if we move the (drm_debug&FOO) outside the > > > > > functions again? > > > > again? > > We used to do that. Someone changed it a while back, unintentially > I believe. > > > > > > > > I'm somewhat concerned about all the function call > > > > > overhead when debugs aren't even enabled. > > > > Perhaps better to have compilation elimination > > of the entire debug output instead. > > That would require every bug reporter to recompile the kernel first. > So this is not a solution we would ever seriously consider. > > Not sure if it would be possible to use the alternatives thing to > eliminate the function calls unless the user boots wih drm.debug!=0? > > > > > I think you are discussing a different issue and > > this discussion should not block this patch as > > this patch has no impact other than code size > > reduction. > > But what is the goal of the code size reduction? Smaller code. > I assume the main > goal is to make better use of the instruction cache to make the > code faster. If there's a tradeoff between smaller and slightly > faster vs. larger and a singificantly faster I tend to think we > should go for the latter option. There's no trade-off in this patch for faster/larger. This patch is simply smaller. Smaller is better. Your faster/larger should be a different patch proposal.