* RE: [ACPI] ACPI mentioned on lwn.net/kernel
@ 2002-01-25 15:42 Moore, Robert
2002-01-25 15:50 ` Horst von Brand
0 siblings, 1 reply; 26+ messages in thread
From: Moore, Robert @ 2002-01-25 15:42 UTC (permalink / raw)
To: Therien, Guy, Grover, Andrew, 'lwn@lwn.net'
Cc: Acpi-linux (E-mail), 'linux-kernel@vger.kernel.org'
And I'll add my comments about so-called "bloat".
Given that the MS VC compiler consistently generates IA-32 code that is over
30% smaller than GCC, I would have to say that Linux would benefit far more
by directing all of the energy spent complaining about code size toward
optimizing the compiler.
Bob
> -----Original Message-----
> From: Therien, Guy [mailto:guy.therien@intel.com]
> Sent: Thursday, January 24, 2002 6:16 PM
> To: Grover, Andrew; 'lwn@lwn.net'
> Cc: Acpi-linux (E-mail); 'linux-kernel@vger.kernel.org'
> Subject: RE: [ACPI] ACPI mentioned on lwn.net/kernel
>
>
> I'll add that contrary to your statement, EVERY other OS with
> ACPI support
> has it in their kernel.
> Since Linux APM support calls the APM BIOS, which is not
> easily changed, and
> ACPI calls AML that you can capture and change to fix any problems
> discovered using available tools, I'd say you were off with
> the statement
> about "an interpreter that can run arbitrary, closed source
> code" also. You
> can't "configure and dump" if you want runtime configuration and power
> management. If you need more info ask on or off the list.
> Regards,
> ACPIGuy
>
> -----Original Message-----
> From: Grover, Andrew [mailto:andrew.grover@intel.com]
> Sent: Thursday, January 24, 2002 5:30 PM
> To: 'lwn@lwn.net'
> Cc: Acpi-linux (E-mail); 'linux-kernel@vger.kernel.org'
> Subject: [ACPI] ACPI mentioned on lwn.net/kernel
>
>
> Hi Jonathan,
>
> As longtime subscribers to acpi-devel know, this seems to
> come up every few
> months, but the criticisms mentioned in this week's lwn.net kernel
> development summary (http://lwn.net/2002/0124/kernel.php3)
> prompt me to
> respond, lest my silence be taken for capitulation. ;-)
>
> The concerns seem to be summed up when the article says, "ACPI brings
> substantial amounts of kernel bloat, reliability worries, and security
> concerns." Let me respond to each of those in reverse order:
>
> 1) Security concerns
> - I think you mistook some kernel developers' off the cuff
> comments about
> this as being real concerns, rather than trolling me (which
> is apparently
> frightfully easy ;-). ACPI is only concerned with power management and
> configuration. It has nothing to do with digital rights
> management, and that
> phrase does not appear anywhere in the 481 page ACPI 2.0
> specification. The
> word "security" appears only twice.
>
> 2) Reliability
> - One of ACPI's design goals was actually to reduce the OS's
> susceptibility
> to bad BIOSs, compared to APM. OSs using APM suffer because
> they must call
> into the BIOS -- relinquish control completely -- to perform power
> management. Under ACPI this is not the case. For example, to
> get the current
> battery status, the steps the OS must perform are defined by the BIOS.
> However, since they are performed by the OS, the OS in fact
> gains visibility
> into the process, and does not ever relinquish control to the BIOS.
>
> 3) Bloat
> - Optimizing for size (or the various unloading schemes)
> should wait until
> the codebase stabilizes. We're still adding major pieces of
> functionality.
> - 100K really isn't that much, compared to other kernel
> modules (determined
> via "size *.o"), or compared to memory installed on most
> machines these
> days.
> - Bloat is compiler-dependent. Compiling the interpreter with
> MSVC instead
> of GCC resulted in a ~40% size decrease.
>
> Anyway, looking towards the future...
>
> Our next release will have preliminary support for PCI IRQ
> routing via ACPI
> (which should solve Jes's problem), along with a complete
> rewrite of the
> ancillary drivers to adopt the new Linux 2.5 driver model.
> When it is ready
> (target: Jan 31st) I'll post on both acpi-devel and
> linux-kernel. My hope
> is, the more people gain familiarity of Linux's ACPI code by
> testing and
> helping in its development, the more we all can accept it on
> its merits, and
> start improving Linux's PnP and power management by using the improved
> functionality ACPI provides.
>
> Regards -- Andy
>
>
> ----------------------------
> Andrew Grover
> Intel/MPG/Mobile Arch Lab
> andrew.grover@intel.com
>
>
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
>
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-25 15:42 [ACPI] ACPI mentioned on lwn.net/kernel Moore, Robert
@ 2002-01-25 15:50 ` Horst von Brand
2002-01-25 16:02 ` Ryan Cumming
0 siblings, 1 reply; 26+ messages in thread
From: Horst von Brand @ 2002-01-25 15:50 UTC (permalink / raw)
To: Moore, Robert
Cc: Therien, Guy, Grover, Andrew, 'lwn@lwn.net',
Acpi-linux (E-mail), 'linux-kernel@vger.kernel.org'
"Moore, Robert" <robert.moore@intel.com> said:
> And I'll add my comments about so-called "bloat".
>
> Given that the MS VC compiler consistently generates IA-32 code that is over
> 30% smaller than GCC, I would have to say that Linux would benefit far more
> by directing all of the energy spent complaining about code size toward
> optimizing the compiler.
Is it faster too? Or at least not slower? If not, what is the point?
--
Horst von Brand http://counter.li.org # 22616
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-25 15:50 ` Horst von Brand
@ 2002-01-25 16:02 ` Ryan Cumming
2002-01-25 16:15 ` Andreas Schwab
0 siblings, 1 reply; 26+ messages in thread
From: Ryan Cumming @ 2002-01-25 16:02 UTC (permalink / raw)
To: Horst von Brand, Moore, Robert
Cc: Therien, Guy, Grover, Andrew, 'lwn@lwn.net',
Acpi-linux (E-mail), 'linux-kernel@vger.kernel.org'
On January 25, 2002 07:50, Horst von Brand wrote:
> > Given that the MS VC compiler consistently generates IA-32 code that is
> > over 30% smaller than GCC, I would have to say that Linux would benefit
> > far more by directing all of the energy spent complaining about code size
> > toward optimizing the compiler.
>
> Is it faster too? Or at least not slower? If not, what is the point?
Storing 30% less executable pages in memory? Reading 30% less executable
pages off the disk? Performing 30% less relocations?
-Ryan
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-25 16:02 ` Ryan Cumming
@ 2002-01-25 16:15 ` Andreas Schwab
2002-01-25 20:05 ` Ryan Cumming
2002-01-26 1:00 ` Linus Torvalds
0 siblings, 2 replies; 26+ messages in thread
From: Andreas Schwab @ 2002-01-25 16:15 UTC (permalink / raw)
To: Ryan Cumming
Cc: Horst von Brand, Moore, Robert, Therien, Guy, Grover, Andrew,
'lwn@lwn.net', Acpi-linux (E-mail),
'linux-kernel@vger.kernel.org'
Ryan Cumming <bodnar42@phalynx.dhs.org> writes:
|> On January 25, 2002 07:50, Horst von Brand wrote:
|> > > Given that the MS VC compiler consistently generates IA-32 code that is
|> > > over 30% smaller than GCC, I would have to say that Linux would benefit
|> > > far more by directing all of the energy spent complaining about code size
|> > > toward optimizing the compiler.
|> >
|> > Is it faster too? Or at least not slower? If not, what is the point?
|>
|> Storing 30% less executable pages in memory? Reading 30% less executable
|> pages off the disk?
These are all startup costs that are lost in the noise the longer the
program runs.
|> Performing 30% less relocations?
30% less code does not imply 30% less relocations.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-25 16:15 ` Andreas Schwab
@ 2002-01-25 20:05 ` Ryan Cumming
2002-01-26 1:00 ` Linus Torvalds
1 sibling, 0 replies; 26+ messages in thread
From: Ryan Cumming @ 2002-01-25 20:05 UTC (permalink / raw)
To: Andreas Schwab
Cc: Horst von Brand, Moore, Robert, Therien, Guy, Grover, Andrew,
'lwn@lwn.net', Acpi-linux (E-mail),
'linux-kernel@vger.kernel.org'
On January 25, 2002 08:15, Andreas Schwab wrote:
> These are all startup costs that are lost in the noise the longer the
> program runs.
Executable size is -not- just a startup cost. Larger executables will have a
bigger memory footprint and less cache locality. A KDE desktop on 64megs of
memory would be noticably more responsive if GCC generated executables the
same size as VC++, due to less swap thrashing alone.
-Ryan
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-25 16:15 ` Andreas Schwab
2002-01-25 20:05 ` Ryan Cumming
@ 2002-01-26 1:00 ` Linus Torvalds
2002-01-26 3:41 ` Jamie Lokier
` (2 more replies)
1 sibling, 3 replies; 26+ messages in thread
From: Linus Torvalds @ 2002-01-26 1:00 UTC (permalink / raw)
To: linux-kernel
In article <jeelkes8y5.fsf@sykes.suse.de>,
Andreas Schwab <schwab@suse.de> wrote:
>|>
>|> Storing 30% less executable pages in memory? Reading 30% less executable
>|> pages off the disk?
>
>These are all startup costs that are lost in the noise the longer the
>program runs.
That's a load of bull.
Startup costs tend to _dominate_ most applications, except for
benchmarks, scientific loads and games/multimedia.
Not surprisingly, those three categories are also the ones where lots of
optimizer tuning is regularly done. But it's a _small_ subset of the
general application load.
Note that not only do startup costs often dominate the rest, they are
psychologically very important. From a user standpoint, an application
that loads "instantly" is mostly viewed as being much more pleasant than
one that takes longer to load, even if the latter were to run faster
once loaded.
This is also something that only gets worse and worse with time. Not
only do caches get more and more important (because the CPU core gets
ever faster compared to the outside world), but they get larger as well.
And what that leads to is that the cache warmup phase (which is linear
wrt size of the problem) gets relatively _slower_ and bigger compared to
the warm cache behaviour (ie the running phase). So optimizing for size
is (a) the right thing to do and (b) going to be even more so in the
future.
It's sad that gcc relegates "optimize for size" to a second-class
citizen. Instead of having a "-Os" (that optimizes for size and doesn't
work together with other optimizations), it would be better to have a
"-Olargecode", which explicitly enables "don't care about code size" for
those (few) applications where it makes sense.
Linus
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-26 1:00 ` Linus Torvalds
@ 2002-01-26 3:41 ` Jamie Lokier
2002-01-26 16:39 ` Martin Eriksson
2002-01-26 17:33 ` Felix von Leitner
2002-01-27 13:56 ` Martin Dalecki
2 siblings, 1 reply; 26+ messages in thread
From: Jamie Lokier @ 2002-01-26 3:41 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
Linus Torvalds wrote:
> It's sad that gcc relegates "optimize for size" to a second-class
> citizen. Instead of having a "-Os" (that optimizes for size and doesn't
> work together with other optimizations), it would be better to have a
> "-Olargecode", which explicitly enables "don't care about code size" for
> those (few) applications where it makes sense.
Btw, there have been suggestions that -Os may actually be faster for x86
code on current processors.
-- Jamie
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-26 3:41 ` Jamie Lokier
@ 2002-01-26 16:39 ` Martin Eriksson
2002-01-26 16:47 ` Jeff Garzik
2002-01-26 21:42 ` Linus Torvalds
0 siblings, 2 replies; 26+ messages in thread
From: Martin Eriksson @ 2002-01-26 16:39 UTC (permalink / raw)
To: Jamie Lokier, Linus Torvalds; +Cc: linux-kernel
----- Original Message -----
From: "Jamie Lokier" <lk@tantalophile.demon.co.uk>
To: "Linus Torvalds" <torvalds@transmeta.com>
Cc: <linux-kernel@vger.kernel.org>
Sent: Saturday, January 26, 2002 4:41 AM
Subject: Re: [ACPI] ACPI mentioned on lwn.net/kernel
> Linus Torvalds wrote:
> > It's sad that gcc relegates "optimize for size" to a second-class
> > citizen. Instead of having a "-Os" (that optimizes for size and doesn't
> > work together with other optimizations), it would be better to have a
> > "-Olargecode", which explicitly enables "don't care about code size" for
> > those (few) applications where it makes sense.
>
> Btw, there have been suggestions that -Os may actually be faster for x86
> code on current processors.
Hmm.. I tried to compile the kernel with -Os (gcc 2.96-98) and I just got a
~1% smaller vmlinux and a ~3% smaller bzImage. Maybe the size optimizations
doesn't show on these files? Internal data structures that are much bigger
than "real" code?
This is how I did:
--- Makefile Sat Jan 26 17:15:52 2002
+++ Makefile.Os Sat Jan 26 17:15:30 2002
@@ -88,7 +88,7 @@
CPPFLAGS := -D__KERNEL__ -I$(HPATH)
-CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
+CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -Os \
-fomit-frame-pointer -fno-strict-aliasing -fno-common
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
_____________________________________________________
| Martin Eriksson <nitrax@giron.wox.org>
| MSc CSE student, department of Computing Science
| Umeå University, Sweden
- ABIT BP6(RU) - 2xCeleron 400 - 128MB/PC100/C2 Acer
- Maxtor 10/5400/U33 HPT P/M - Seagate 6/5400/DMA2 HPT S/M
- 2xDE-530TX - 1xTulip - Linux 2.4.17+ide+preempt
^ permalink raw reply [flat|nested] 26+ messages in thread* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-26 16:39 ` Martin Eriksson
@ 2002-01-26 16:47 ` Jeff Garzik
2002-01-26 17:48 ` Jamie Lokier
2002-01-26 21:42 ` Linus Torvalds
1 sibling, 1 reply; 26+ messages in thread
From: Jeff Garzik @ 2002-01-26 16:47 UTC (permalink / raw)
To: Martin Eriksson; +Cc: Jamie Lokier, Linus Torvalds, linux-kernel
Martin Eriksson wrote:
>
> ----- Original Message -----
> From: "Jamie Lokier" <lk@tantalophile.demon.co.uk>
> To: "Linus Torvalds" <torvalds@transmeta.com>
> Cc: <linux-kernel@vger.kernel.org>
> Sent: Saturday, January 26, 2002 4:41 AM
> Subject: Re: [ACPI] ACPI mentioned on lwn.net/kernel
>
> > Linus Torvalds wrote:
> > > It's sad that gcc relegates "optimize for size" to a second-class
> > > citizen. Instead of having a "-Os" (that optimizes for size and doesn't
> > > work together with other optimizations), it would be better to have a
> > > "-Olargecode", which explicitly enables "don't care about code size" for
> > > those (few) applications where it makes sense.
> >
> > Btw, there have been suggestions that -Os may actually be faster for x86
> > code on current processors.
>
> Hmm.. I tried to compile the kernel with -Os (gcc 2.96-98) and I just got a
> ~1% smaller vmlinux and a ~3% smaller bzImage. Maybe the size optimizations
> doesn't show on these files? Internal data structures that are much bigger
> than "real" code?
That doesn't tell us much unless you benchmark any speed
improvements/degradations noticed. Hidden in that 1% may be more
favorable I-cache usage, better register usage... who knows.
It would also be interesting to compile key files like kernel/sched.c or
mm/vmscan.c in assembly using O2 and Os, and compare the output with
diff -u.
Jeff
--
Jeff Garzik | "I went through my candy like hot oatmeal
Building 1024 | through an internally-buttered weasel."
MandrakeSoft | - goats.com
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-26 16:47 ` Jeff Garzik
@ 2002-01-26 17:48 ` Jamie Lokier
2002-01-26 18:25 ` Martin Eriksson
0 siblings, 1 reply; 26+ messages in thread
From: Jamie Lokier @ 2002-01-26 17:48 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Martin Eriksson, Linus Torvalds, linux-kernel
Jeff Garzik wrote:
> > Hmm.. I tried to compile the kernel with -Os (gcc 2.96-98) and I just got a
> > ~1% smaller vmlinux and a ~3% smaller bzImage. Maybe the size optimizations
> > doesn't show on these files? Internal data structures that are much bigger
> > than "real" code?
>
> That doesn't tell us much unless you benchmark any speed
> improvements/degradations noticed. Hidden in that 1% may be more
> favorable I-cache usage, better register usage... who knows.
>
> It would also be interesting to compile key files like kernel/sched.c or
> mm/vmscan.c in assembly using O2 and Os, and compare the output with
> diff -u.
It'd be good to know why it's not achieving the quoted 30% space saving
that other compilers manage for normal code, unless it's myth of course.
-- Jamie
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-26 17:48 ` Jamie Lokier
@ 2002-01-26 18:25 ` Martin Eriksson
0 siblings, 0 replies; 26+ messages in thread
From: Martin Eriksson @ 2002-01-26 18:25 UTC (permalink / raw)
To: Jamie Lokier, Jeff Garzik; +Cc: Linus Torvalds, linux-kernel
----- Original Message -----
From: "Jamie Lokier" <lk@tantalophile.demon.co.uk>
To: "Jeff Garzik" <jgarzik@mandrakesoft.com>
Cc: "Martin Eriksson" <nitrax@giron.wox.org>; "Linus Torvalds"
<torvalds@transmeta.com>; <linux-kernel@vger.kernel.org>
Sent: Saturday, January 26, 2002 6:48 PM
Subject: Re: [ACPI] ACPI mentioned on lwn.net/kernel
> Jeff Garzik wrote:
> > > Hmm.. I tried to compile the kernel with -Os (gcc 2.96-98) and I just
got a
> > > ~1% smaller vmlinux and a ~3% smaller bzImage. Maybe the size
optimizations
> > > doesn't show on these files? Internal data structures that are much
bigger
> > > than "real" code?
> >
> > That doesn't tell us much unless you benchmark any speed
> > improvements/degradations noticed. Hidden in that 1% may be more
> > favorable I-cache usage, better register usage... who knows.
> >
> > It would also be interesting to compile key files like kernel/sched.c or
> > mm/vmscan.c in assembly using O2 and Os, and compare the output with
> > diff -u.
>
> It'd be good to know why it's not achieving the quoted 30% space saving
> that other compilers manage for normal code, unless it's myth of course.
>
So I compiled sched.c to assembly (note that I have the rml preempt patch
there too), and the results are pretty strange:
Diff between -O2 and -Os:
http://giron.wox.org/sched.s.diff
As you can see, not much size optimizing are done from -O2.
The C file:
http://giron.wox.org/sched.c
Command line:
gcc -D__KERNEL__ -Wall -Wstrict-prototypes -Wno-trigraphs -OX \
-fomit-frame-pointer -fno-strict-aliasing -fno-common -S sched.c
where -OX have been replaced by -O0 -O2 -O3 and -Os
The assembler files:
http://giron.wox.org/sched.s.o0
http://giron.wox.org/sched.s.o2
http://giron.wox.org/sched.s.o3
http://giron.wox.org/sched.s.os
The file created with -O0 (no optimization) is the biggest of all, even
bigger than -O3.
-O2 and -Os differ only about 1%
So either
a) -O2 does size optimization
b) -Os sucks at size optimization
_____________________________________________________
| Martin Eriksson <nitrax@giron.wox.org>
| MSc CSE student, department of Computing Science
| Umeå University, Sweden
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-26 16:39 ` Martin Eriksson
2002-01-26 16:47 ` Jeff Garzik
@ 2002-01-26 21:42 ` Linus Torvalds
2002-01-30 9:22 ` Andrey Panin
1 sibling, 1 reply; 26+ messages in thread
From: Linus Torvalds @ 2002-01-26 21:42 UTC (permalink / raw)
To: Martin Eriksson; +Cc: Jamie Lokier, linux-kernel
On Sat, 26 Jan 2002, Martin Eriksson wrote:
>
> Hmm.. I tried to compile the kernel with -Os (gcc 2.96-98) and I just got a
> ~1% smaller vmlinux and a ~3% smaller bzImage.
Note that while "-Os" exists and is documented, as far as I know gcc
doesn't actually do much with it. It really acts mostly as a "disable
certain optimizations" than anything else.
In the 3.0.x tree, it seems to change some of the weights of some
instructions, and it might make more of a difference there. But at the
same time it is quite telling that "-Os" doesn't even change any of the
alignments etc - because gcc developers do not seem to really support it
as a real option. It's an after-thought, not a big performance push.
Linus
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-26 21:42 ` Linus Torvalds
@ 2002-01-30 9:22 ` Andrey Panin
[not found] ` <Pine.LNX.4.33.0201291412590.18804-100000@coffee.psychology.mcmaster.ca>
0 siblings, 1 reply; 26+ messages in thread
From: Andrey Panin @ 2002-01-30 9:22 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]
On Sat, Jan 26, 2002 at 01:42:52PM -0800, Linus Torvalds wrote:
>
> On Sat, 26 Jan 2002, Martin Eriksson wrote:
> >
> > Hmm.. I tried to compile the kernel with -Os (gcc 2.96-98) and I just got a
> > ~1% smaller vmlinux and a ~3% smaller bzImage.
>
> Note that while "-Os" exists and is documented, as far as I know gcc
> doesn't actually do much with it. It really acts mostly as a "disable
> certain optimizations" than anything else.
>
Stupid questions:
- what stop us from using -mregparm=3 gcc switch ?
- same with -Os -malign-loops=1 -malign-jumps=1 ?
- any tool to measure perfomance gain/penalty of above ?
> In the 3.0.x tree, it seems to change some of the weights of some
> instructions, and it might make more of a difference there. But at the
> same time it is quite telling that "-Os" doesn't even change any of the
> alignments etc - because gcc developers do not seem to really support it
> as a real option. It's an after-thought, not a big performance push.
>
> Linus
>
--
Andrey Panin | Embedded systems software engineer
pazke@orbita1.ru | PGP key: wwwkeys.eu.pgp.net
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-26 1:00 ` Linus Torvalds
2002-01-26 3:41 ` Jamie Lokier
@ 2002-01-26 17:33 ` Felix von Leitner
2002-01-26 19:40 ` Florian Weimer
2002-01-27 13:56 ` Martin Dalecki
2 siblings, 1 reply; 26+ messages in thread
From: Felix von Leitner @ 2002-01-26 17:33 UTC (permalink / raw)
To: linux-kernel
Thus spake Linus Torvalds (torvalds@transmeta.com):
> >These are all startup costs that are lost in the noise the longer the
> >program runs.
> That's a load of bull.
Agreed. I like to plug my diet libc slides at this point which (I hope)
make a point about this with network programming as an example. See
http://www.fefe.de/dietlibc/talk.pdf for details.
> Startup costs tend to _dominate_ most applications, except for
> benchmarks, scientific loads and games/multimedia.
> Not surprisingly, those three categories are also the ones where lots of
> optimizer tuning is regularly done. But it's a _small_ subset of the
> general application load.
Exactly. However, due to these optimizations the trend goes to large
long-running monster applications like Mozilla or GNOME and KDE. KDE
does not ask me whether I want to run those 20 processes all the time.
It just starts them. And new processes are forked off a long running
process because the start-up cost has become so large.
> Note that not only do startup costs often dominate the rest, they are
> psychologically very important.
That is not just psychological. Most developers would do good to visit
a close university or school and see what kind of machines they use
there. Ever tried installing Debian on a Sparc SLC? It took a little
over 24 hours. Compiling a kernel takes over 12 hours on that box IIRC.
But that's not the point. This hardware was very much usable a few
years ago. Today it's practically futile to use it. You are waiting
more than you are working. On my desktop Athlon, 1.3 million CPU cycles
static start-up cost for running a dynamically linked glibc program may
not look like much. But my statically linked ls does an ls -rtl of a
directory with 10 files in less time.
> It's sad that gcc relegates "optimize for size" to a second-class
> citizen. Instead of having a "-Os" (that optimizes for size and doesn't
> work together with other optimizations), it would be better to have a
> "-Olargecode", which explicitly enables "don't care about code size" for
> those (few) applications where it makes sense.
What do you mean with "does not work together with other optimizations"?
I use -Os all the time. Actually, -Os often produces faster code than
-O2 or -O3! What other optimizations do you mean? I don't need much
other optimizer options besides -fomit-frame-pointer and -march=athlon
if you link PIC code and use an Athlon.
And since -funroll-loops and -finline-functions are enabled explicitly
(or the latter with -O3 and larger by people who don't know what they
are doing), I think gcc already does what you want it to do ;)
Felix
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
2002-01-26 1:00 ` Linus Torvalds
2002-01-26 3:41 ` Jamie Lokier
2002-01-26 17:33 ` Felix von Leitner
@ 2002-01-27 13:56 ` Martin Dalecki
2 siblings, 0 replies; 26+ messages in thread
From: Martin Dalecki @ 2002-01-27 13:56 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel
Linus Torvalds wrote:
>In article <jeelkes8y5.fsf@sykes.suse.de>,
>Andreas Schwab <schwab@suse.de> wrote:
>
>>|>
>>|> Storing 30% less executable pages in memory? Reading 30% less executable
>>|> pages off the disk?
>>
>>These are all startup costs that are lost in the noise the longer the
>>program runs.
>>
>
>That's a load of bull.
>
>Startup costs tend to _dominate_ most applications, except for
>benchmarks, scientific loads and games/multimedia.
>
Well the situation is in fact even more embarassing if you do true
benchmarking on really long running
(well that's relative of course) applications. I personaly did once in a
time a benchmarking on the good
old tex running trhough a few hundert pages long document. Well the -O2
version was actually about 15%
*SLOWER* then the -Os version. That's becouse in real world
applications, which don't do numerical
calculations but most of the time they do "decision taking" the whole
mulitpipline sceduling get's
outwighted by the simple cache pressure thing by *far*.
The whole GCC developement is badly misguided on this for *sure*. They
develop for numerics where
most programs are kind of doing a controlling/decision taking job.
Well I know I should try this with the kernel one time...
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [ACPI] ACPI mentioned on lwn.net/kernel
@ 2002-01-27 23:58 Dieter Nützel
0 siblings, 0 replies; 26+ messages in thread
From: Dieter Nützel @ 2002-01-27 23:58 UTC (permalink / raw)
To: Martin Dalecki; +Cc: Linux Kernel List
On Sunday, 27. January 2002 13:56, Martin Dalecki wrote:
> Linus Torvalds wrote:
>
> > In article <jeelkes8y5.fsf@sykes.suse.de>,
> > Andreas Schwab <schwab@suse.de> wrote:
> >
> >>|>
> >>|> Storing 30% less executable pages in memory? Reading 30% less
> >>|> executable
> >>|> pages off the disk?
> >>
> >>These are all startup costs that are lost in the noise the longer the
> >>program runs.
> >>
> >
> >That's a load of bull.
> >
> >Startup costs tend to _dominate_ most applications, except for
> >benchmarks, scientific loads and games/multimedia.
> >
> Well the situation is in fact even more embarassing if you do true
> benchmarking on really long running (well that's relative of course)
> applications. I personaly did once in a time a benchmarking on the good old
> tex running trhough a few hundert pages long document. Well the -O2 version
> was actually about 15% *SLOWER* then the -Os version. That's becouse in real
> world applications, which don't do numerical calculations but most of the
> time they do "decision taking" the whole mulitpipline sceduling get's
> outwighted by the simple cache pressure thing by *far*.
>
> The whole GCC developement is badly misguided on this for *sure*. They
> develop for numerics where most programs are kind of doing a
> controlling/decision taking job.
> Well I know I should try this with the kernel one time...
I can second that.
Now that I'm running AMD Athlon's since August 1999 I found during 3D
development/benchmarking (OpenGL/Mesa) that the following GCC flags are
"best" for Athlon/Duron with gcc-2.95.3:
-O -mcpu=k6 -pipe -mpreferred-stack-boundary=2 -malign-functions=4
-fschedule-insns2 -fexpensive-optimizations
I even compile the whole kernel with a little different flags setting. It is
smaller and "faster" with them.
HOSTCFLAGS = -Wall -Wstrict-prototypes -O -fomit-frame-pointer -mcpu=k6
-pipe -mpreferred-stack-boundary=2 -malign-functions=4 -fschedule-insns2
-fexpensive-optimizations
CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O \
-fomit-frame-pointer -fno-strict-aliasing -fno-common
linux/arch/i386/Makefile:
ifdef CONFIG_MK7
CFLAGS += $(shell if $(CC) -march=athlon -S -o /dev/null -xc /dev/null
>/dev/null 2>&1; then echo "-march=athlon"; else echo "-mcpu=k6 -pipe
-mpreferred-stack-boundary=2 -malign-functions=4 -fschedule-insns2
-fexpensive-optimizations"; fi)
endif
Regards,
Dieter
--
Dieter Nützel
Graduate Student, Computer Science
University of Hamburg
Department of Computer Science
@home: Dieter.Nuetzel@hamburg.de
^ permalink raw reply [flat|nested] 26+ messages in thread[parent not found: <200201251550.g0PFoIPa002738@tigger.cs.uni-dortmund.de.suse.lists.linux.kernel>]
[parent not found: <fa.juevf8v.1u7ubb8@ifi.uio.no>]
* RE: [ACPI] ACPI mentioned on lwn.net/kernel
@ 2002-01-25 2:15 Therien, Guy
0 siblings, 0 replies; 26+ messages in thread
From: Therien, Guy @ 2002-01-25 2:15 UTC (permalink / raw)
To: Grover, Andrew, 'lwn@lwn.net'
Cc: Acpi-linux (E-mail), 'linux-kernel@vger.kernel.org'
I'll add that contrary to your statement, EVERY other OS with ACPI support
has it in their kernel.
Since Linux APM support calls the APM BIOS, which is not easily changed, and
ACPI calls AML that you can capture and change to fix any problems
discovered using available tools, I'd say you were off with the statement
about "an interpreter that can run arbitrary, closed source code" also. You
can't "configure and dump" if you want runtime configuration and power
management. If you need more info ask on or off the list.
Regards,
ACPIGuy
-----Original Message-----
From: Grover, Andrew [mailto:andrew.grover@intel.com]
Sent: Thursday, January 24, 2002 5:30 PM
To: 'lwn@lwn.net'
Cc: Acpi-linux (E-mail); 'linux-kernel@vger.kernel.org'
Subject: [ACPI] ACPI mentioned on lwn.net/kernel
Hi Jonathan,
As longtime subscribers to acpi-devel know, this seems to come up every few
months, but the criticisms mentioned in this week's lwn.net kernel
development summary (http://lwn.net/2002/0124/kernel.php3) prompt me to
respond, lest my silence be taken for capitulation. ;-)
The concerns seem to be summed up when the article says, "ACPI brings
substantial amounts of kernel bloat, reliability worries, and security
concerns." Let me respond to each of those in reverse order:
1) Security concerns
- I think you mistook some kernel developers' off the cuff comments about
this as being real concerns, rather than trolling me (which is apparently
frightfully easy ;-). ACPI is only concerned with power management and
configuration. It has nothing to do with digital rights management, and that
phrase does not appear anywhere in the 481 page ACPI 2.0 specification. The
word "security" appears only twice.
2) Reliability
- One of ACPI's design goals was actually to reduce the OS's susceptibility
to bad BIOSs, compared to APM. OSs using APM suffer because they must call
into the BIOS -- relinquish control completely -- to perform power
management. Under ACPI this is not the case. For example, to get the current
battery status, the steps the OS must perform are defined by the BIOS.
However, since they are performed by the OS, the OS in fact gains visibility
into the process, and does not ever relinquish control to the BIOS.
3) Bloat
- Optimizing for size (or the various unloading schemes) should wait until
the codebase stabilizes. We're still adding major pieces of functionality.
- 100K really isn't that much, compared to other kernel modules (determined
via "size *.o"), or compared to memory installed on most machines these
days.
- Bloat is compiler-dependent. Compiling the interpreter with MSVC instead
of GCC resulted in a ~40% size decrease.
Anyway, looking towards the future...
Our next release will have preliminary support for PCI IRQ routing via ACPI
(which should solve Jes's problem), along with a complete rewrite of the
ancillary drivers to adopt the new Linux 2.5 driver model. When it is ready
(target: Jan 31st) I'll post on both acpi-devel and linux-kernel. My hope
is, the more people gain familiarity of Linux's ACPI code by testing and
helping in its development, the more we all can accept it on its merits, and
start improving Linux's PnP and power management by using the improved
functionality ACPI provides.
Regards -- Andy
----------------------------
Andrew Grover
Intel/MPG/Mobile Arch Lab
andrew.grover@intel.com
_______________________________________________
Acpi-devel mailing list
Acpi-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-devel
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2002-01-30 7:58 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-25 15:42 [ACPI] ACPI mentioned on lwn.net/kernel Moore, Robert
2002-01-25 15:50 ` Horst von Brand
2002-01-25 16:02 ` Ryan Cumming
2002-01-25 16:15 ` Andreas Schwab
2002-01-25 20:05 ` Ryan Cumming
2002-01-26 1:00 ` Linus Torvalds
2002-01-26 3:41 ` Jamie Lokier
2002-01-26 16:39 ` Martin Eriksson
2002-01-26 16:47 ` Jeff Garzik
2002-01-26 17:48 ` Jamie Lokier
2002-01-26 18:25 ` Martin Eriksson
2002-01-26 21:42 ` Linus Torvalds
2002-01-30 9:22 ` Andrey Panin
[not found] ` <Pine.LNX.4.33.0201291412590.18804-100000@coffee.psychology.mcmaster.ca>
2002-01-30 8:00 ` Andrey Panin
2002-01-26 17:33 ` Felix von Leitner
2002-01-26 19:40 ` Florian Weimer
2002-01-27 13:56 ` Martin Dalecki
-- strict thread matches above, loose matches on Subject: below --
2002-01-27 23:58 Dieter Nützel
[not found] <200201251550.g0PFoIPa002738@tigger.cs.uni-dortmund.de.suse.lists.linux.kernel>
[not found] ` <200201250802.32508.bodnar42@phalynx.dhs.org.suse.lists.linux.kernel>
[not found] ` <jeelkes8y5.fsf@sykes.suse.de.suse.lists.linux.kernel>
[not found] ` <a2sv2s$ge3$1@penguin.transmeta.com.suse.lists.linux.kernel>
[not found] ` <20020126034106.F5730@kushida.apsleyroad.org.suse.lists.linux.kernel>
[not found] ` <012d01c1a687$faa11120$0201a8c0@HOMER.suse.lists.linux.kernel>
2002-01-26 22:43 ` Andi Kleen
[not found] <fa.juevf8v.1u7ubb8@ifi.uio.no>
[not found] ` <fa.h3u09pv.1v2k3bm@ifi.uio.no>
2002-01-26 2:12 ` Dan Maas
2002-01-26 3:45 ` Jamie Lokier
2002-01-26 4:33 ` Alexander Viro
2002-01-26 4:38 ` Andrew Pimlott
2002-01-26 4:59 ` Jamie Lokier
2002-01-26 5:11 ` Jamie Lokier
2002-01-25 2:15 Therien, Guy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox