From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Andr=E9_Goddard_Rosa?= Subject: Re: [dm-devel] [PATCH v4 00/12] introduce skip_spaces(), reducing code size plus some clean-ups Date: Sun, 8 Nov 2009 14:52:18 -0200 Message-ID: References: <1257696303.4184.8.camel@mulgrave.site> Reply-To: Linux filesystem caching discussion list Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1257696303.4184.8.camel@mulgrave.site> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-cachefs-bounces@redhat.com Errors-To: linux-cachefs-bounces@redhat.com To: James Bottomley Cc: Pavel Roskin , Stefan Haberland , Jan Kara , linux-cachefs@redhat.com, Mike Snitzer , Neil Brown , Frederic Weisbecker , Jens Axboe , Heiko Carstens , "James E . J . Bottomley" , ibm-acpi-devel@lists.sourceforge.net, device-mapper development , Julia Lawall , "H . Peter Anvin" , Daire Byrne , Alan Cox , Greg Banks , Stefan Weinhuber , Eric Sandeen , Adam Belay , netfilter-devel@vger.kernel.org, Helge Deller , x86@kernel.org, James Morris , Takashi Iwai , Ing List-Id: linux-raid.ids Hi, James! On Sun, Nov 8, 2009 at 2:05 PM, James Bottomley wrote: > On Sat, 2009-11-07 at 13:16 -0200, Andr=E9 Goddard Rosa wrote: >> This patch reduces lib.a code size by 173 bytes on my Core 2 with gcc = 4.4.1 >> even considering that it exports a newly defined function skip_spaces(= ) >> to drivers: >> =A0 =A0text =A0 =A0data =A0 =A0 bss =A0 =A0 dec =A0 =A0 hex filename >> =A0 64867 =A0 =A0 840 =A0 =A0 592 =A0 66299 =A0 102fb (TOTALS-lib.a-be= fore) >> =A0 64954 =A0 =A0 584 =A0 =A0 588 =A0 66126 =A0 1024e (TOTALS-lib.a-af= ter) >> and implements some code tidy up. >> >> Besides reducing lib.a size, it converts many in-tree drivers to use t= he >> newly defined function, which makes another small reduction on kernel = size >> overall when those drivers are used. > > Before we embark on something as massive as this, could we take a step > back. =A0I agree that if I were coming up with the strstip() interface > today I probably wouldn't have given it two overloaded uses. > > However, I think the function, in spite of this minor issue, is very > usable. =A0I still don't understand why people thought adding a > __must_check, which is what damaged one of the overloaded uses, is a > good idea. Differently of "static void strip(char *str)"@scripts/kconfig/conf.c , this function does not moves the characters to the beginning of the string, so that if = that string is going to be reused it should refer to the newly returned string= start. I've changed it to remove the const and return a "char *". Do you think __must_check is not needed as well? Thanks, Andr=E9 From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Andr=E9_Goddard_Rosa?= Subject: Re: [dm-devel] [PATCH v4 00/12] introduce skip_spaces(), reducing code size plus some clean-ups Date: Sun, 8 Nov 2009 14:52:18 -0200 Message-ID: References: <1257696303.4184.8.camel@mulgrave.site> Reply-To: Linux filesystem caching discussion list Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Cc: Pavel Roskin , Stefan Haberland , Jan Kara , linux-cachefs@redhat.com, Mike Snitzer , Neil Brown , Frederic Weisbecker , Jens Axboe , Heiko Carstens , "James E . J . Bottomley" , ibm-acpi-devel@lists.sourceforge.net, device-mapper development , Julia Lawall , "H . Peter Anvin" , Daire Byrne , Alan Cox , Greg Banks , Stefan Weinhuber , Eric Sandeen , Adam Belay , netfilter-devel@vger.kernel.org, Helge Deller , x86@kernel.org, James Morris , Takashi Iwai , Ing To: James Bottomley Return-path: In-Reply-To: <1257696303.4184.8.camel@mulgrave.site> List-Id: Linux filesystem caching discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-cachefs-bounces@redhat.com Hi, James! On Sun, Nov 8, 2009 at 2:05 PM, James Bottomley wrote: > On Sat, 2009-11-07 at 13:16 -0200, Andr=E9 Goddard Rosa wrote: >> This patch reduces lib.a code size by 173 bytes on my Core 2 with gcc = 4.4.1 >> even considering that it exports a newly defined function skip_spaces(= ) >> to drivers: >> =A0 =A0text =A0 =A0data =A0 =A0 bss =A0 =A0 dec =A0 =A0 hex filename >> =A0 64867 =A0 =A0 840 =A0 =A0 592 =A0 66299 =A0 102fb (TOTALS-lib.a-be= fore) >> =A0 64954 =A0 =A0 584 =A0 =A0 588 =A0 66126 =A0 1024e (TOTALS-lib.a-af= ter) >> and implements some code tidy up. >> >> Besides reducing lib.a size, it converts many in-tree drivers to use t= he >> newly defined function, which makes another small reduction on kernel = size >> overall when those drivers are used. > > Before we embark on something as massive as this, could we take a step > back. =A0I agree that if I were coming up with the strstip() interface > today I probably wouldn't have given it two overloaded uses. > > However, I think the function, in spite of this minor issue, is very > usable. =A0I still don't understand why people thought adding a > __must_check, which is what damaged one of the overloaded uses, is a > good idea. Differently of "static void strip(char *str)"@scripts/kconfig/conf.c , this function does not moves the characters to the beginning of the string, so that if = that string is going to be reused it should refer to the newly returned string= start. I've changed it to remove the const and return a "char *". Do you think __must_check is not needed as well? Thanks, Andr=E9 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: MIME-Version: 1.0 In-Reply-To: <1257696303.4184.8.camel@mulgrave.site> References: <1257696303.4184.8.camel@mulgrave.site> From: =?ISO-8859-1?Q?Andr=E9_Goddard_Rosa?= Date: Sun, 8 Nov 2009 14:52:18 -0200 Message-ID: Subject: Re: [uml-devel] [dm-devel] [PATCH v4 00/12] introduce skip_spaces(), reducing code size plus some clean-ups List-Id: The user-mode Linux development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: user-mode-linux-devel-bounces@lists.sourceforge.net To: James Bottomley Cc: Pavel Roskin , Stefan Haberland , Jan Kara , linux-cachefs@redhat.com, Mike Snitzer , Neil Brown , Frederic Weisbecker , Jens Axboe , Heiko Carstens , Steve Dickson , "James E . J . Bottomley" , David Howells , ibm-acpi-devel@lists.sourceforge.net, device-mapper development , Julia Lawall , "H . Peter Anvin" , Daire Byrne , Alan Cox , Greg Banks , Stefan Weinhuber , Eric Sandeen , Adam Belay , netfilter-devel@vger.kernel.org, Helge Deller , x86@kernel.org, James Morris , Takashi Iwai , Ingo Molnar , Alasdair G Kergon , WANG Cong , Roman Hoog Antink , linux-ext4@vger.kernel.org, Alexey Dobriyan , Andrea Righi , alsa-devel@alsa-project.org, Len Brown , Samuel Ortiz , coreteam@netfilter.org, user-mode-linux-devel@lists.sourceforge.net, linux-s390@vger.kernel.org, Trond Myklebust , Jeff Dike , Rusty Russell , Henrique de Moraes Holschuh , Sitsofe Wheeler , Steven Rostedt , linux-raid@vger.kernel.org, Martin Schwidefsky , Andreas Dilger , Pekka Enberg , Mikulas Patocka , Al Viro , user-mode-linux-user@lists.sourceforge.net, Jaroslav Kysela , Thomas Gleixner , Michael Holzheu , Arjan van de Ven , Jan Engelhardt , Bjorn Helgaas , Andre Noll , Theodore Ts'o , linux-parisc@vger.kernel.org, "Martin K . Petersen" , netdev@vger.kernel.org, Jason Baron , Greg Kroah-Hartman , Roel Kluin , linux-kernel@vger.kernel.org, Stoyan Gaydarov , Patrick McHardy , Kyle McMarti n , Chr istof Schmitt , netfilter@vger.kernel.org, Richard Purdie , Joe Perches , linux390@de.ibm.com, Andrew Morton , Andrey Borzenkov , "David S . Miller" Hi, James! On Sun, Nov 8, 2009 at 2:05 PM, James Bottomley wrote: > On Sat, 2009-11-07 at 13:16 -0200, Andr=E9 Goddard Rosa wrote: >> This patch reduces lib.a code size by 173 bytes on my Core 2 with gcc 4.= 4.1 >> even considering that it exports a newly defined function skip_spaces() >> to drivers: >> =A0 =A0text =A0 =A0data =A0 =A0 bss =A0 =A0 dec =A0 =A0 hex filename >> =A0 64867 =A0 =A0 840 =A0 =A0 592 =A0 66299 =A0 102fb (TOTALS-lib.a-befo= re) >> =A0 64954 =A0 =A0 584 =A0 =A0 588 =A0 66126 =A0 1024e (TOTALS-lib.a-afte= r) >> and implements some code tidy up. >> >> Besides reducing lib.a size, it converts many in-tree drivers to use the >> newly defined function, which makes another small reduction on kernel si= ze >> overall when those drivers are used. > > Before we embark on something as massive as this, could we take a step > back. =A0I agree that if I were coming up with the strstip() interface > today I probably wouldn't have given it two overloaded uses. > > However, I think the function, in spite of this minor issue, is very > usable. =A0I still don't understand why people thought adding a > __must_check, which is what damaged one of the overloaded uses, is a > good idea. Differently of "static void strip(char *str)"@scripts/kconfig/conf.c , this function does not moves the characters to the beginning of the string, so that if th= at string is going to be reused it should refer to the newly returned string s= tart. I've changed it to remove the const and return a "char *". Do you think __must_check is not needed as well? Thanks, Andr=E9 ---------------------------------------------------------------------------= --- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day = trial. Simplify your report design, integration and deployment - and focus = on = what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel