* [PATCH 0/3] make mdelay, udelay and ssleep calls smaller
@ 2006-08-22 15:08 Denis Vlasenko
0 siblings, 0 replies; 2+ messages in thread
From: Denis Vlasenko @ 2006-08-22 15:08 UTC (permalink / raw)
To: linux-kernel, Andrew Morton
Currently, magic in include/linux/delay.h
inlines mdelay and ssleep, and various arches
do the same to udelay.
This is pointless. We are going to perform a delay of 1000+
CPU cycles anyway, no need to optimize away a few cycles.
This patchset converts calls to these functions
into true functuon calls, with no additional
math done or hidden arguments pushed to stack
at the callsite.
Tested on i386, (almost) allyesconfig kernel:
# size linux-2.6.17.9.org/vmlinux linux-2.6.17.9.delay/vmlinux
text data bss dec hex filename
25342204 5921954 1937036 33201194 1fa9c2a linux-2.6.17.9.org/vmlinux
25335905 5921982 1937036 33194923 1fa83ab linux-2.6.17.9.delay/vmlinux
Signed-off-by: Denis Vlasenko <vda.linux@googlemail.com>
--
vda
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH 0/3] make mdelay, udelay and ssleep calls smaller
@ 2006-09-22 8:03 Denis Vlasenko
0 siblings, 0 replies; 2+ messages in thread
From: Denis Vlasenko @ 2006-09-22 8:03 UTC (permalink / raw)
To: linux-kernel, Andrew Morton, Russell King
Hello Andrew,
This version is basically unchanged except for rediff
against 2.6.18. I was running previous version for
several weeks on 2.6.17.x kernels.
Russell King was giving me some feedback. I think that
my reply satisfied him - I got no further comments:
On Wednesday 23 August 2006 10:39, Denis Vlasenko wrote:
>On Wednesday 23 August 2006 10:14, Russell King wrote:
>> Please keep a "const" version in ARM. Thanks.
>
> Why do you want to keep it?
> I mean, without it udelay(n) will become slower by the time
> needed for one extra multiply. So we will have maybe
> udelay(n) ==> udelay(n+0.1).
>
>> Since the multiply is pure overhead, it's better
>> to get rid of it.
>
>You do not need to optimize delay for speed. If you
>really want to, then you can do:
>
>#define udelay(n) do {} while(0)
>
>Makes sense? No it does not. That's what I'm trying to say.
>You WANT to pause for thousands of cycles. Why you are trying
>to shave off ~10 cycles at the very same time?
>
>Hope it makes things clearer.
On with patch explanation:
Currently, magic in include/linux/delay.h
inlines mdelay and ssleep, and various arches
do the same to udelay.
This is pointless. We are going to perform a delay of 1000+
CPU cycles anyway, no need to optimize away a few cycles.
This patchset converts magic calls to these inlines/macros
into pure and simple function calls, with no additional
math done or hidden arguments pushed to stack
at the callsite.
Reduces allyesconfig kernel by about 7 kb.
Signed-off-by: Denis Vlasenko <vda.linux@googlemail.com>
--
vda
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-22 8:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-22 15:08 [PATCH 0/3] make mdelay, udelay and ssleep calls smaller Denis Vlasenko
-- strict thread matches above, loose matches on Subject: below --
2006-09-22 8:03 Denis Vlasenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox