From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751593AbcJAUBD (ORCPT ); Sat, 1 Oct 2016 16:01:03 -0400 Received: from smtprelay0088.hostedemail.com ([216.40.44.88]:34096 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750839AbcJAUBC (ORCPT ); Sat, 1 Oct 2016 16:01:02 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3871:3872:3873:4250:4321:5007:6119:7903:8603:10004:10400:10848:11232:11658:11914:12043:12555:12740:13069:13311:13357:13439:13894:14181:14659:14721:21080:21433:21434:30054:30062:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: rice05_8ab4fe72521d X-Filterd-Recvd-Size: 1707 Message-ID: <1475352058.1996.1.camel@perches.com> Subject: Re: [PATCH] realtek: rtl8xxxu: Use const init arrays From: Joe Perches To: Jes Sorensen Cc: Kalle Valo , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Sat, 01 Oct 2016 13:00:58 -0700 In-Reply-To: References: <459bf15427d92cd052fb2fe080438fd97a8a6cd8.1475343483.git.joe@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.21.91-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2016-10-01 at 14:53 -0400, Jes Sorensen wrote: > Joe Perches writes: > > Make the init arrays const to reduce data. > > $ size drivers/net/wireless/realtek/rtl8xxxu/built-in.o* (allyesconfig: x86-32) > >   text data bss dec hex filename > >   80107 13651 58 93816 16e78 drivers/net/wireless/realtek/rtl8xxxu/built-in.o.new > >   65303 28435 58 93796 16e64 drivers/net/wireless/realtek/rtl8xxxu/built-in.o.old > In total you grow the kernel by 20 bytes. You reduce the data segment > substantially while growing the text segment instead. No, not really. The alignment boundaries move a bit for this particular compilation. It could go the other way for a different compiler version or set of CONFIG options. What's important is multiple pages of .data move to .rodata.