linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [-mm patch] i386: enable REGPARM by default
@ 2005-05-15 11:57 Adrian Bunk
  2005-05-15 12:22 ` Andi Kleen
  0 siblings, 1 reply; 11+ messages in thread
From: Adrian Bunk @ 2005-05-15 11:57 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

This patch should _not_ go into Linus' tree.

At some time in the future, we want to unconditionally enable REGPARM on 
i386.

Let's give it a bit broader testing coverage among -mm users.

This patch:
- removes the dependency of REGPARM on EXPERIMENTAL
- let REGPARM default to y

This patch assumes that people who use -mm are willing to test some more 
experimental features.

After this patch, REGPARM is still a config option users can disable.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

--- linux-2.6.12-rc4-mm1-full/arch/i386/Kconfig.old	2005-05-15 12:03:28.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/arch/i386/Kconfig	2005-05-15 12:03:54.000000000 +0200
@@ -911,9 +911,8 @@
 	default y
 
 config REGPARM
-	bool "Use register arguments (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
-	default n
+	bool "Use register arguments"
+	default y
 	help
 	Compile the kernel with -mregparm=3. This uses a different ABI
 	and passes the first three arguments of a function call in registers.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [-mm patch] i386: enable REGPARM by default
  2005-05-15 11:57 [-mm patch] i386: enable REGPARM by default Adrian Bunk
@ 2005-05-15 12:22 ` Andi Kleen
  2005-05-15 12:37   ` Adrian Bunk
  0 siblings, 1 reply; 11+ messages in thread
From: Andi Kleen @ 2005-05-15 12:22 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

Adrian Bunk <bunk@stusta.de> writes:

> This patch should _not_ go into Linus' tree.
>
> At some time in the future, we want to unconditionally enable REGPARM on 
> i386.
>
> Let's give it a bit broader testing coverage among -mm users.

iirc problem is that gcc 2.95 and possibly 3.0.x have some known
miscompilations with regparams. That is why it was only used
with fastcall for a long time. One 3.1.x+ it should be safe.
But you cannot express dependencies on the compiler version
in Kconfig right now.

Of course getting rid of gcc 2.95 and 3.0.x support would be a good idea,
that would allow many other nice things.

-Andi


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [-mm patch] i386: enable REGPARM by default
  2005-05-15 12:22 ` Andi Kleen
@ 2005-05-15 12:37   ` Adrian Bunk
  2005-05-15 13:00     ` Andi Kleen
  0 siblings, 1 reply; 11+ messages in thread
From: Adrian Bunk @ 2005-05-15 12:37 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

On Sun, May 15, 2005 at 02:22:34PM +0200, Andi Kleen wrote:
> Adrian Bunk <bunk@stusta.de> writes:
> 
> > This patch should _not_ go into Linus' tree.
> >
> > At some time in the future, we want to unconditionally enable REGPARM on 
> > i386.
> >
> > Let's give it a bit broader testing coverage among -mm users.
> 
> iirc problem is that gcc 2.95 and possibly 3.0.x have some known
> miscompilations with regparams. That is why it was only used
> with fastcall for a long time. One 3.1.x+ it should be safe.
> But you cannot express dependencies on the compiler version
> in Kconfig right now.
> 
> Of course getting rid of gcc 2.95 and 3.0.x support would be a good idea,
> that would allow many other nice things.

If you'd read either arch/i386/Makefile or the help text for 
CONFIG_REGPARM, you'd have noticed that we do never use regparm with
gcc < 3.0 .

> -Andi

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [-mm patch] i386: enable REGPARM by default
  2005-05-15 12:37   ` Adrian Bunk
@ 2005-05-15 13:00     ` Andi Kleen
  2005-05-15 13:12       ` Arjan van de Ven
  2005-05-15 13:16       ` Adrian Bunk
  0 siblings, 2 replies; 11+ messages in thread
From: Andi Kleen @ 2005-05-15 13:00 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel

On Sun, May 15, 2005 at 02:37:31PM +0200, Adrian Bunk wrote:
> On Sun, May 15, 2005 at 02:22:34PM +0200, Andi Kleen wrote:
> > Adrian Bunk <bunk@stusta.de> writes:
> > 
> > > This patch should _not_ go into Linus' tree.
> > >
> > > At some time in the future, we want to unconditionally enable REGPARM on 
> > > i386.
> > >
> > > Let's give it a bit broader testing coverage among -mm users.
> > 
> > iirc problem is that gcc 2.95 and possibly 3.0.x have some known
> > miscompilations with regparams. That is why it was only used
> > with fastcall for a long time. One 3.1.x+ it should be safe.
> > But you cannot express dependencies on the compiler version
> > in Kconfig right now.
> > 
> > Of course getting rid of gcc 2.95 and 3.0.x support would be a good idea,
> > that would allow many other nice things.
> 
> If you'd read either arch/i386/Makefile or the help text for 
> CONFIG_REGPARM, you'd have noticed that we do never use regparm with
> gcc < 3.0 .

Yes, this means you cannot have binary compatible kernels compiled
with different compilers. Which might be a bad thing.  For that
reason alone I would keep the config.

-Andi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [-mm patch] i386: enable REGPARM by default
  2005-05-15 13:00     ` Andi Kleen
@ 2005-05-15 13:12       ` Arjan van de Ven
  2005-05-15 13:16       ` Adrian Bunk
  1 sibling, 0 replies; 11+ messages in thread
From: Arjan van de Ven @ 2005-05-15 13:12 UTC (permalink / raw)
  To: Andi Kleen; +Cc: Adrian Bunk, linux-kernel


> 
> Yes, this means you cannot have binary compatible kernels compiled
> with different compilers. Which might be a bad thing. 

you already have that anyway!
There are several kernel data structures that have padding in them
ifdef'd on older gcc versions just to work around bugs; gcc2 -> gcc3 as
a result has a major different abi anyway so I don't think your argument
holds.. (and in 2.6, the gcc version is part of the VERMAGIC so the
exact compiler is enforced anyway)



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [-mm patch] i386: enable REGPARM by default
  2005-05-15 13:00     ` Andi Kleen
  2005-05-15 13:12       ` Arjan van de Ven
@ 2005-05-15 13:16       ` Adrian Bunk
  1 sibling, 0 replies; 11+ messages in thread
From: Adrian Bunk @ 2005-05-15 13:16 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-kernel

On Sun, May 15, 2005 at 03:00:08PM +0200, Andi Kleen wrote:
> On Sun, May 15, 2005 at 02:37:31PM +0200, Adrian Bunk wrote:
> > On Sun, May 15, 2005 at 02:22:34PM +0200, Andi Kleen wrote:
> > > Adrian Bunk <bunk@stusta.de> writes:
> > > 
> > > > This patch should _not_ go into Linus' tree.
> > > >
> > > > At some time in the future, we want to unconditionally enable REGPARM on 
> > > > i386.
> > > >
> > > > Let's give it a bit broader testing coverage among -mm users.
> > > 
> > > iirc problem is that gcc 2.95 and possibly 3.0.x have some known
> > > miscompilations with regparams. That is why it was only used
> > > with fastcall for a long time. One 3.1.x+ it should be safe.
> > > But you cannot express dependencies on the compiler version
> > > in Kconfig right now.
> > > 
> > > Of course getting rid of gcc 2.95 and 3.0.x support would be a good idea,
> > > that would allow many other nice things.
> > 
> > If you'd read either arch/i386/Makefile or the help text for 
> > CONFIG_REGPARM, you'd have noticed that we do never use regparm with
> > gcc < 3.0 .
> 
> Yes, this means you cannot have binary compatible kernels compiled
> with different compilers. Which might be a bad thing.  For that
> reason alone I would keep the config.

We never guarantee binary compatibility with different compilers.

And gcc 2 <-> gcc 3 is an example where it's easy to see that there's no 
binary compatibility in the kernel.

> -Andi

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [-mm patch] i386: enable REGPARM by default
  2005-06-25  7:46 ` Denis Vlasenko
@ 2005-06-28 12:16   ` Jens Axboe
  0 siblings, 0 replies; 11+ messages in thread
From: Jens Axboe @ 2005-06-28 12:16 UTC (permalink / raw)
  To: Denis Vlasenko; +Cc: Adrian Bunk, Andrew Morton, linux-kernel

On Sat, Jun 25 2005, Denis Vlasenko wrote:
> On Friday 24 June 2005 23:09, Adrian Bunk wrote:
> > This patch should _not_ go into Linus' tree.
> > 
> > At some time in the future, we want to unconditionally enable REGPARM on 
> > i386.
> > 
> > Let's give it a bit broader testing coverage among -mm users.
> > 
> > This patch:
> > - removes the dependency of REGPARM on EXPERIMENTAL
> > - let REGPARM default to y
> > 
> > This patch assumes that people who use -mm are willing to test some more 
> > experimental features.
> > 
> > After this patch, REGPARM is still a config option users can disable.
> > 
> > Signed-off-by: Adrian Bunk <bunk@stusta.de>
> 
> Jens Axboe had hit an obscure bug with regparm just yesterday.
> It happened for him with gcc 3.3.5.
> 
> I have a preprocessed .c file which allows to reporduce this.
> For me, gcc 3.3.6 is okay. need to build 3.3.5 and test.
> 
> Meanwhile, maybe we shall prohibit regparm if gcc <=3.3.6 or 3.4?

It triggered without regparm as well, so I don't think that is to blame
here.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [-mm patch] i386: enable REGPARM by default
  2005-06-24 20:09 Adrian Bunk
  2005-06-24 20:28 ` Andrew Morton
@ 2005-06-25  7:46 ` Denis Vlasenko
  2005-06-28 12:16   ` Jens Axboe
  1 sibling, 1 reply; 11+ messages in thread
From: Denis Vlasenko @ 2005-06-25  7:46 UTC (permalink / raw)
  To: Adrian Bunk, Andrew Morton; +Cc: linux-kernel

On Friday 24 June 2005 23:09, Adrian Bunk wrote:
> This patch should _not_ go into Linus' tree.
> 
> At some time in the future, we want to unconditionally enable REGPARM on 
> i386.
> 
> Let's give it a bit broader testing coverage among -mm users.
> 
> This patch:
> - removes the dependency of REGPARM on EXPERIMENTAL
> - let REGPARM default to y
> 
> This patch assumes that people who use -mm are willing to test some more 
> experimental features.
> 
> After this patch, REGPARM is still a config option users can disable.
> 
> Signed-off-by: Adrian Bunk <bunk@stusta.de>

Jens Axboe had hit an obscure bug with regparm just yesterday.
It happened for him with gcc 3.3.5.

I have a preprocessed .c file which allows to reporduce this.
For me, gcc 3.3.6 is okay. need to build 3.3.5 and test.

Meanwhile, maybe we shall prohibit regparm if gcc <=3.3.6 or 3.4?
--
vda


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [-mm patch] i386: enable REGPARM by default
  2005-06-24 20:09 Adrian Bunk
@ 2005-06-24 20:28 ` Andrew Morton
  2005-06-25  7:46 ` Denis Vlasenko
  1 sibling, 0 replies; 11+ messages in thread
From: Andrew Morton @ 2005-06-24 20:28 UTC (permalink / raw)
  To: Adrian Bunk; +Cc: linux-kernel, fastboot

Adrian Bunk <bunk@stusta.de> wrote:
>
> This patch:
> - removes the dependency of REGPARM on EXPERIMENTAL
> - let REGPARM default to y

hm, a compromise.

One other concern I have with this is that I expect -mregparm will make
kgdb (and now crashdump) less useful.  When incoming args are on the stack
you have a good chance of being able to see what their value is by walking
the stack slots.

When the incoming args are in registers I'd expect that it would be a lot
harder (or impossible) to work out their value.

Have the kdump guys thought about (or encountered) this?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [-mm patch] i386: enable REGPARM by default
@ 2005-06-24 20:09 Adrian Bunk
  2005-06-24 20:28 ` Andrew Morton
  2005-06-25  7:46 ` Denis Vlasenko
  0 siblings, 2 replies; 11+ messages in thread
From: Adrian Bunk @ 2005-06-24 20:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

This patch should _not_ go into Linus' tree.

At some time in the future, we want to unconditionally enable REGPARM on 
i386.

Let's give it a bit broader testing coverage among -mm users.

This patch:
- removes the dependency of REGPARM on EXPERIMENTAL
- let REGPARM default to y

This patch assumes that people who use -mm are willing to test some more 
experimental features.

After this patch, REGPARM is still a config option users can disable.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 30 May 2005
- 15 May 2005

--- linux-2.6.12-rc4-mm1-full/arch/i386/Kconfig.old	2005-05-15 12:03:28.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/arch/i386/Kconfig	2005-05-15 12:03:54.000000000 +0200
@@ -911,9 +911,8 @@
 	default y
 
 config REGPARM
-	bool "Use register arguments (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
-	default n
+	bool "Use register arguments"
+	default y
 	help
 	Compile the kernel with -mregparm=3. This uses a different ABI
 	and passes the first three arguments of a function call in registers.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [-mm patch] i386: enable REGPARM by default
@ 2005-05-30  0:28 Adrian Bunk
  0 siblings, 0 replies; 11+ messages in thread
From: Adrian Bunk @ 2005-05-30  0:28 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

This patch should _not_ go into Linus' tree.

At some time in the future, we want to unconditionally enable REGPARM on 
i386.

Let's give it a bit broader testing coverage among -mm users.

This patch:
- removes the dependency of REGPARM on EXPERIMENTAL
- let REGPARM default to y

This patch assumes that people who use -mm are willing to test some more 
experimental features.

After this patch, REGPARM is still a config option users can disable.

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

This patch was already sent on:
- 15 May 2005

--- linux-2.6.12-rc4-mm1-full/arch/i386/Kconfig.old	2005-05-15 12:03:28.000000000 +0200
+++ linux-2.6.12-rc4-mm1-full/arch/i386/Kconfig	2005-05-15 12:03:54.000000000 +0200
@@ -911,9 +911,8 @@
 	default y
 
 config REGPARM
-	bool "Use register arguments (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
-	default n
+	bool "Use register arguments"
+	default y
 	help
 	Compile the kernel with -mregparm=3. This uses a different ABI
 	and passes the first three arguments of a function call in registers.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-06-28 12:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-15 11:57 [-mm patch] i386: enable REGPARM by default Adrian Bunk
2005-05-15 12:22 ` Andi Kleen
2005-05-15 12:37   ` Adrian Bunk
2005-05-15 13:00     ` Andi Kleen
2005-05-15 13:12       ` Arjan van de Ven
2005-05-15 13:16       ` Adrian Bunk
2005-05-30  0:28 Adrian Bunk
2005-06-24 20:09 Adrian Bunk
2005-06-24 20:28 ` Andrew Morton
2005-06-25  7:46 ` Denis Vlasenko
2005-06-28 12:16   ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).