From: "André Goddard Rosa" <andre.goddard@gmail.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Pavel Roskin <proski@gnu.org>,
Stefan Haberland <stefan.haberland@de.ibm.com>,
Jan Kara <jack@suse.cz>,
linux-cachefs@redhat.com, Mike Snitzer <snitzer@redhat.com>,
Neil Brown <neilb@suse.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jens Axboe <jens.axboe@oracle.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
"James E . J . Bottomley" <jejb@parisc-linux.org>,
ibm-acpi-devel@lists.sourceforge.net,
device-mapper development <dm-devel@redhat.com>,
Julia Lawall <julia@diku.dk>, "H . Peter Anvin" <hpa@zytor.com>,
Daire Byrne <Daire.Byrne@framestore.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Greg Banks <gnb@melbourne.sgi.com>,
Stefan Weinhuber <wein@de.ibm.com>,
Eric Sandeen <sandeen@redhat.com>, Adam Belay <abelay@mit.edu>,
netfilter-devel@vger.kernel.org, Helge Deller <deller@gmx.de>,
x86@kernel.org, James Morris <jmorris@namei.org>,
Takashi Iwai <tiwai@suse.de>,
Ing
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 [thread overview]
Message-ID: <b8bf37780911080852l10d11f4ele5bf6a6aed94c5fe@mail.gmail.com> (raw)
In-Reply-To: <1257696303.4184.8.camel@mulgrave.site>
Hi, James!
On Sun, Nov 8, 2009 at 2:05 PM, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
> On Sat, 2009-11-07 at 13:16 -0200, André 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:
>> text data bss dec hex filename
>> 64867 840 592 66299 102fb (TOTALS-lib.a-before)
>> 64954 584 588 66126 1024e (TOTALS-lib.a-after)
>> 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 size
>> overall when those drivers are used.
>
> Before we embark on something as massive as this, could we take a step
> back. I 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. I 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é
WARNING: multiple messages have this Message-ID (diff)
From: "André Goddard Rosa" <andre.goddard@gmail.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Pavel Roskin <proski@gnu.org>,
Stefan Haberland <stefan.haberland@de.ibm.com>,
Jan Kara <jack@suse.cz>,
linux-cachefs@redhat.com, Mike Snitzer <snitzer@redhat.com>,
Neil Brown <neilb@suse.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jens Axboe <jens.axboe@oracle.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
"James E . J . Bottomley" <jejb@parisc-linux.org>,
ibm-acpi-devel@lists.sourceforge.net,
device-mapper development <dm-devel@redhat.com>,
Julia Lawall <julia@diku.dk>, "H . Peter Anvin" <hpa@zytor.com>,
Daire Byrne <Daire.Byrne@framestore.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Greg Banks <gnb@melbourne.sgi.com>,
Stefan Weinhuber <wein@de.ibm.com>,
Eric Sandeen <sandeen@redhat.com>, Adam Belay <abelay@mit.edu>,
netfilter-devel@vger.kernel.org, Helge Deller <deller@gmx.de>,
x86@kernel.org, James Morris <jmorris@namei.org>,
Takashi Iwai <tiwai@suse.de>,
Ing
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 [thread overview]
Message-ID: <b8bf37780911080852l10d11f4ele5bf6a6aed94c5fe@mail.gmail.com> (raw)
In-Reply-To: <1257696303.4184.8.camel@mulgrave.site>
Hi, James!
On Sun, Nov 8, 2009 at 2:05 PM, James Bottomley
<James.Bottomley@hansenpartnership.com> 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
WARNING: multiple messages have this Message-ID (diff)
From: "André Goddard Rosa" <andre.goddard@gmail.com>
To: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Pavel Roskin <proski@gnu.org>,
Stefan Haberland <stefan.haberland@de.ibm.com>,
Jan Kara <jack@suse.cz>,
linux-cachefs@redhat.com, Mike Snitzer <snitzer@redhat.com>,
Neil Brown <neilb@suse.de>,
Frederic Weisbecker <fweisbec@gmail.com>,
Jens Axboe <jens.axboe@oracle.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
Steve Dickson <steved@redhat.com>,
"James E . J . Bottomley" <jejb@parisc-linux.org>,
David Howells <dhowells@redhat.com>,
ibm-acpi-devel@lists.sourceforge.net,
device-mapper development <dm-devel@redhat.com>,
Julia Lawall <julia@diku.dk>, "H . Peter Anvin" <hpa@zytor.com>,
Daire Byrne <Daire.Byrne@framestore.com>,
Alan Cox <alan@lxorguk.ukuu.org.uk>,
Greg Banks <gnb@melbourne.sgi.com>,
Stefan Weinhuber <wein@de.ibm.com>,
Eric Sandeen <sandeen@redhat.com>, Adam Belay <abelay@mit.edu>,
netfilter-devel@vger.kernel.org, Helge Deller <deller@gmx.de>,
x86@kernel.org, James Morris <jmorris@namei.org>,
Takashi Iwai <tiwai@suse.de>, Ingo Molnar <mingo@redhat.com>,
Alasdair G Kergon <agk@redhat.com>,
WANG Cong <wangcong@zeuux.org>, Roman Hoog Antink <rha@open.ch>,
linux-ext4@vger.kernel.org, Alexey Dobriyan <adobriyan@gmail.com>,
Andrea Righi <righi.andrea@gmail.com>,
alsa-devel@alsa-project.org, Len Brown <len.brown@intel.com>,
Samuel Ortiz <samuel@sortiz.org>,
coreteam@netfilter.org,
user-mode-linux-devel@lists.sourceforge.net,
linux-s390@vger.kernel.org,
Trond Myklebust <Trond.Myklebust@netapp.com>,
Jeff Dike <jdike@addtoit.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>,
Sitsofe Wheeler <sitsofe@yahoo.com>,
Steven Rostedt <rostedt@goodmis.org>,
linux-raid@vger.kernel.org,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Andreas Dilger <adilger@sun.com>,
Pekka Enberg <penberg@cs.helsinki.fi>,
Mikulas Patocka <mpatocka@redhat.com>,
Al Viro <viro@zeniv.linux.org.uk>,
user-mode-linux-user@lists.sourceforge.net,
Jaroslav Kysela <perex@perex.cz>,
Thomas Gleixner <tglx@linutronix.de>,
Michael Holzheu <holzheu@linux.vnet.ibm.com>,
Arjan van de Ven <arjan@linux.intel.com>,
Jan Engelhardt <jengelh@medozas.de>,
Bjorn Helgaas <bjorn.helgaas@hp.com>,
Andre Noll <maan@systemlinux.org>, Theodore Ts'o <tytso@mit.edu>,
linux-parisc@vger.kernel.org,
"Martin K . Petersen" <martin.petersen@oracle.com>,
netdev@vger.kernel.org, Jason Baron <jbaron@redhat.com>,
Greg Kroah-Hartman <gregkh@suse.de>,
Roel Kluin <roel.kluin@gmail.com>,
linux-kernel@vger.kernel.org,
Stoyan Gaydarov <stoyboyker@gmail.com>,
Patrick McHardy <kaber@trash.net>,
Kyle McMarti n <kyle@mcmartin.ca>,
Chr istof Schmitt <christof.schmitt@de.ibm.com>,
netfilter@vger.kernel.org, Richard Purdie <rpurdie@rpsys.net>,
Joe Perches <joe@perches.com>,
linux390@de.ibm.com, Andrew Morton <akpm@linux-foundation.org>,
Andrey Borzenkov <arvidjaar@mail.ru>,
"David S . Miller" <davem@davemloft.net>
Subject: Re: [uml-devel] [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 [thread overview]
Message-ID: <b8bf37780911080852l10d11f4ele5bf6a6aed94c5fe@mail.gmail.com> (raw)
In-Reply-To: <1257696303.4184.8.camel@mulgrave.site>
Hi, James!
On Sun, Nov 8, 2009 at 2:05 PM, James Bottomley
<James.Bottomley@hansenpartnership.com> wrote:
> On Sat, 2009-11-07 at 13:16 -0200, André 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:
>> text data bss dec hex filename
>> 64867 840 592 66299 102fb (TOTALS-lib.a-before)
>> 64954 584 588 66126 1024e (TOTALS-lib.a-after)
>> 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 size
>> overall when those drivers are used.
>
> Before we embark on something as massive as this, could we take a step
> back. I 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. I 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é
------------------------------------------------------------------------------
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
next prev parent reply other threads:[~2009-11-08 16:52 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-07 15:16 [PATCH v4 00/12] introduce skip_spaces(), reducing code size plus some clean-ups André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] [PATCH v4 01/12] vsprintf: factorize "(null)" string André Goddard Rosa
2009-11-08 15:37 ` Jan Engelhardt
2009-11-08 15:49 ` André Goddard Rosa
2009-11-09 3:28 ` Rusty Russell
2009-11-10 14:33 ` André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] [PATCH v4 02/12] vsprintf: pre-calculate final string length for later use André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] [PATCH v4 03/12] vsprintf: give it some care to please checkpatch.pl André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 04/12] vsprintf: use TOLOWER whenever possible André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 05/12] vsprintf: reduce code size by avoiding extra check André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 06/12] vsprintf: move local vars to block local vars and remove unneeded ones André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 07/12] vsprintf: factor out skip_space code in a separate function André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-08 15:44 ` Jan Engelhardt
2009-11-08 15:52 ` André Goddard Rosa
[not found] ` <31525.1257770343@redhat.com>
2009-11-09 15:31 ` André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 08/12] vsprintf: reuse almost identical simple_strtoulX() functions André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-07 16:33 ` André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] [PATCH v4 09/12] ctype: constify read-only _ctype string André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 10/12] string: factorize skip_spaces and export it to be generally available André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 16:23 ` André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-08 15:54 ` Jan Engelhardt
2009-11-08 16:38 ` James Bottomley
2009-11-08 16:54 ` Jan Engelhardt
2009-11-08 16:59 ` André Goddard Rosa
2009-11-08 16:50 ` Alan Cox
2009-11-08 16:50 ` [uml-devel] " Alan Cox
2009-11-08 16:50 ` Alan Cox
2009-11-09 14:02 ` André Goddard Rosa
2009-11-08 16:56 ` Jan Engelhardt
2009-11-07 15:16 ` [PATCH v4 11/12] string: on strstrip(), first remove leading spaces before running over str André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-07 15:16 ` [PATCH v4 12/12] tree-wide: convert open calls to remove spaces to skip_spaces() lib function André Goddard Rosa
2009-11-07 15:16 ` André Goddard Rosa
2009-11-07 15:16 ` [uml-devel] " André Goddard Rosa
2009-11-08 18:47 ` Theodore Tso
2009-11-08 18:47 ` [uml-devel] " Theodore Tso
2009-11-08 18:47 ` Theodore Tso
2009-11-08 18:47 ` Theodore Tso
2009-11-08 20:23 ` Julia Lawall
2009-11-08 20:23 ` [uml-devel] " Julia Lawall
2009-11-15 6:19 ` André Goddard Rosa
2009-11-15 6:37 ` André Goddard Rosa
2009-11-14 4:20 ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
2009-11-14 7:44 ` André Goddard Rosa
2009-11-08 16:05 ` [dm-devel] [PATCH v4 00/12] introduce skip_spaces(), reducing code size plus some clean-ups James Bottomley
2009-11-08 16:05 ` James Bottomley
2009-11-08 16:05 ` [uml-devel] " James Bottomley
2009-11-08 16:05 ` James Bottomley
2009-11-08 16:05 ` James Bottomley
2009-11-08 16:52 ` André Goddard Rosa [this message]
2009-11-08 16:52 ` [uml-devel] " André Goddard Rosa
2009-11-08 16:52 ` André Goddard Rosa
2009-11-08 16:55 ` Jan Engelhardt
2009-11-08 17:02 ` Alexey Dobriyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b8bf37780911080852l10d11f4ele5bf6a6aed94c5fe@mail.gmail.com \
--to=andre.goddard@gmail.com \
--cc=Daire.Byrne@framestore.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=abelay@mit.edu \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=deller@gmx.de \
--cc=dm-devel@redhat.com \
--cc=fweisbec@gmail.com \
--cc=gnb@melbourne.sgi.com \
--cc=heiko.carstens@de.ibm.com \
--cc=hpa@zytor.com \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=jack@suse.cz \
--cc=jejb@parisc-linux.org \
--cc=jens.axboe@oracle.com \
--cc=jmorris@namei.org \
--cc=julia@diku.dk \
--cc=linux-cachefs@redhat.com \
--cc=neilb@suse.de \
--cc=netfilter-devel@vger.kernel.org \
--cc=proski@gnu.org \
--cc=sandeen@redhat.com \
--cc=snitzer@redhat.com \
--cc=stefan.haberland@de.ibm.com \
--cc=tiwai@suse.de \
--cc=wein@de.ibm.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.