From: Adrian Bunk <bunk@fs.tum.de>
To: Andrew Morton <akpm@osdl.org>
Cc: suparna@in.ibm.com, daniel@osdl.org, linux-aio@kvack.org,
linux-kernel@vger.kernel.org, pbadari@us.ibm.com
Subject: Re: Patch for Retry based AIO-DIO (Was AIO and DIOtestingon2.6.0-test7-mm1)
Date: Sun, 26 Oct 2003 12:57:19 +0100 [thread overview]
Message-ID: <20031026115719.GA10333@fs.tum.de> (raw)
In-Reply-To: <20031023164638.5c32b80f.akpm@osdl.org>
On Thu, Oct 23, 2003 at 04:46:38PM -0700, Andrew Morton wrote:
>...
> > -Os has it's benefits on some systems, so it shouldn't be totally hidden
> > under EMBEDDED. OTOH, it's less tested, so only people who know what
> > they are doing should use it (EXPERIMENTAL plus help text).
>
> It causes kernels to crash on a major linux distribution. We need to
> either make it very hard to turn on, or just forget it altogether.
The -Os patch with a dependency on EMBEDDED is below.
diffstat output:
arch/arm/Makefile | 2 --
arch/h8300/Kconfig | 4 ++++
arch/h8300/Makefile | 2 +-
Makefile | 8 +++++++-
init/Kconfig | 10 ++++++++++
5 files changed, 22 insertions(+), 4 deletions(-)
cu
Adrian
--- linux-2.6.0-test9/init/Kconfig.old 2003-10-26 12:48:21.000000000 +0100
+++ linux-2.6.0-test9/init/Kconfig 2003-10-26 12:49:56.000000000 +0100
@@ -196,6 +196,16 @@
source "drivers/block/Kconfig.iosched"
+config CC_OPTIMIZE_FOR_SIZE
+ bool "Optimize for size" if EMBEDDED
+ default y if ARM || H8300
+ default n
+ help
+ Enabling this option will pass "-Os" instead of "-O2" to gcc
+ resulting in a smaller kernel.
+
+ If unsure, say N.
+
endmenu # General setup
--- linux-2.6.0-test9/Makefile.old 2003-10-26 12:48:15.000000000 +0100
+++ linux-2.6.0-test9/Makefile 2003-10-26 12:48:32.000000000 +0100
@@ -275,7 +275,7 @@
CPPFLAGS := -D__KERNEL__ -Iinclude \
$(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include)
-CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
+CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common
AFLAGS := -D__ASSEMBLY__
@@ -431,6 +431,12 @@
# ---------------------------------------------------------------------------
+ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
+CFLAGS += -Os
+else
+CFLAGS += -O2
+endif
+
ifndef CONFIG_FRAME_POINTER
CFLAGS += -fomit-frame-pointer
endif
--- linux-2.6.0-test5-mm4/arch/arm/Makefile.old 2003-09-25 14:38:18.000000000 +0200
+++ linux-2.6.0-test5-mm4/arch/arm/Makefile 2003-09-25 14:40:47.000000000 +0200
@@ -14,8 +14,6 @@
GZFLAGS :=-9
#CFLAGS +=-pipe
-CFLAGS :=$(CFLAGS:-O2=-Os)
-
ifeq ($(CONFIG_FRAME_POINTER),y)
CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
endif
--- linux-2.6.0-test5-mm4/arch/h8300/Kconfig.old 2003-09-25 14:43:27.000000000 +0200
+++ linux-2.6.0-test5-mm4/arch/h8300/Kconfig 2003-09-25 14:43:44.000000000 +0200
@@ -5,6 +5,10 @@
mainmenu "uClinux/h8300 (w/o MMU) Kernel Configuration"
+config H8300
+ bool
+ default y
+
config MMU
bool
default n
--- linux-2.6.0-test5-mm4/arch/h8300/Makefile.old 2003-09-25 14:38:18.000000000 +0200
+++ linux-2.6.0-test5-mm4/arch/h8300/Makefile 2003-09-25 14:38:24.000000000 +0200
@@ -34,7 +34,7 @@
ldflags-$(CONFIG_CPU_H8S) := -mh8300self
CFLAGS += $(cflags-y)
-CFLAGS += -mint32 -fno-builtin -Os
+CFLAGS += -mint32 -fno-builtin
CFLAGS += -g
CFLAGS += -D__linux__
CFLAGS += -DUTS_SYSNAME=\"uClinux\"
next prev parent reply other threads:[~2003-10-26 11:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-17 23:12 AIO and DIO testing on 2.6.0-test7-mm1 Daniel McNeil
2003-10-18 0:24 ` Andrew Morton
2003-10-20 14:27 ` Suparna Bhattacharya
2003-10-20 23:47 ` Daniel McNeil
2003-10-21 12:11 ` Patch for Retry based AIO-DIO (Was AIO and DIO testing on 2.6.0-test7-mm1) Suparna Bhattacharya
2003-10-23 0:40 ` Daniel McNeil
2003-10-23 10:49 ` Suparna Bhattacharya
2003-10-23 13:50 ` Suparna Bhattacharya
2003-10-23 22:59 ` Andrew Morton
2003-10-23 23:20 ` Patch for Retry based AIO-DIO (Was AIO and DIO testing on2.6.0-test7-mm1) Adrian Bunk
2003-10-23 23:25 ` Andrew Morton
2003-10-23 23:37 ` Patch for Retry based AIO-DIO (Was AIO and DIO testingon2.6.0-test7-mm1) Adrian Bunk
2003-10-23 23:46 ` Andrew Morton
2003-10-24 0:34 ` Patch for Retry based AIO-DIO (Was AIO and DIOtestingon2.6.0-test7-mm1) Adrian Bunk
2003-10-26 11:57 ` Adrian Bunk [this message]
2003-10-26 12:08 ` Russell King
2003-10-26 12:17 ` Adrian Bunk
2003-10-26 13:00 ` Russell King
2003-10-23 23:22 ` Patch for Retry based AIO-DIO (Was AIO and DIO testing on 2.6.0-test7-mm1) Dan Kegel
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=20031026115719.GA10333@fs.tum.de \
--to=bunk@fs.tum.de \
--cc=akpm@osdl.org \
--cc=daniel@osdl.org \
--cc=linux-aio@kvack.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbadari@us.ibm.com \
--cc=suparna@in.ibm.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome