All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xz: make use of BCJ filter also for 32-bit x86 kernel
@ 2012-03-15 15:45 Jan Beulich
  2012-03-16 18:47 ` Lasse Collin
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2012-03-15 15:45 UTC (permalink / raw)
  To: lasse.collin; +Cc: linux-kernel

The ARCH value for 32-bit x86 is not x86, but i?86.

This reduces the image sizes of the kernels I routinely build by almost
100k (surprisingly much, to me at least).

Signed-off-by: Jan Beulich <jbeulich@suse.com>

---
 scripts/xz_wrap.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 3.3-rc7/scripts/xz_wrap.sh
+++ 3.3-rc7-xz-bcj-ix86/scripts/xz_wrap.sh
@@ -13,7 +13,7 @@ BCJ=
 LZMA2OPTS=
 
 case $ARCH in
-	x86|x86_64)     BCJ=--x86 ;;
+	i?86|x86_64)    BCJ=--x86 ;;
 	powerpc)        BCJ=--powerpc ;;
 	ia64)           BCJ=--ia64; LZMA2OPTS=pb=4 ;;
 	arm)            BCJ=--arm ;;




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

* Re: [PATCH] xz: make use of BCJ filter also for 32-bit x86 kernel
  2012-03-15 15:45 [PATCH] xz: make use of BCJ filter also for 32-bit x86 kernel Jan Beulich
@ 2012-03-16 18:47 ` Lasse Collin
  2012-03-19  8:04   ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Lasse Collin @ 2012-03-16 18:47 UTC (permalink / raw)
  To: Jan Beulich; +Cc: linux-kernel

On 2012-03-15 Jan Beulich wrote:
> The ARCH value for 32-bit x86 is not x86, but i?86.

Thanks for noticing this. Is ARCH even the correct variable to use?
Maybe SRCARCH would be better. Then it would be enough to test for x86,
if I understand the toplevel Makefile correctly.

On SPARC, it seems to be possible that ARCH is sparc32 or sparc64 while
SRCARCH is always sparc, so currently xz_wrap.sh seems to be buggy on
SPARC too.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode

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

* Re: [PATCH] xz: make use of BCJ filter also for 32-bit x86 kernel
  2012-03-16 18:47 ` Lasse Collin
@ 2012-03-19  8:04   ` Jan Beulich
  2012-03-19 12:36     ` Lasse Collin
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2012-03-19  8:04 UTC (permalink / raw)
  To: Lasse Collin; +Cc: linux-kernel

>>> On 16.03.12 at 19:47, Lasse Collin <lasse.collin@tukaani.org> wrote:
> On 2012-03-15 Jan Beulich wrote:
>> The ARCH value for 32-bit x86 is not x86, but i?86.
> 
> Thanks for noticing this. Is ARCH even the correct variable to use?
> Maybe SRCARCH would be better. Then it would be enough to test for x86,
> if I understand the toplevel Makefile correctly.

Yes, that might be even better (albeit requiring adjustment of the script
should the naming in the source tree ever change again, whereas the
ARCH values are supposedly stable).

> On SPARC, it seems to be possible that ARCH is sparc32 or sparc64 while
> SRCARCH is always sparc, so currently xz_wrap.sh seems to be buggy on
> SPARC too.

Indeed.

Will you get a patch to Linus then to fix all of these in 3.4?

Jan


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

* Re: [PATCH] xz: make use of BCJ filter also for 32-bit x86 kernel
  2012-03-19  8:04   ` Jan Beulich
@ 2012-03-19 12:36     ` Lasse Collin
  2012-03-19 12:51       ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Lasse Collin @ 2012-03-19 12:36 UTC (permalink / raw)
  To: Jan Beulich; +Cc: linux-kernel

On 2012-03-19 Jan Beulich wrote:
> >>> On 16.03.12 at 19:47, Lasse Collin <lasse.collin@tukaani.org>
> >>> wrote:
> > On 2012-03-15 Jan Beulich wrote:
> >> The ARCH value for 32-bit x86 is not x86, but i?86.
> > 
> > Thanks for noticing this. Is ARCH even the correct variable to use?
> > Maybe SRCARCH would be better. Then it would be enough to test for
> > x86, if I understand the toplevel Makefile correctly.
> 
> Yes, that might be even better (albeit requiring adjustment of the
> script should the naming in the source tree ever change again,
> whereas the ARCH values are supposedly stable).

I think I will go with SRCARCH then. The directory names don't change so
often.

Could you quickly check if the following is OK? It works on x86-64.

diff --git a/scripts/xz_wrap.sh b/scripts/xz_wrap.sh
--- a/scripts/xz_wrap.sh
+++ b/scripts/xz_wrap.sh
@@ -12,8 +12,8 @@
 BCJ=
 LZMA2OPTS=
 
-case $ARCH in
-	x86|x86_64)     BCJ=--x86 ;;
+case $SRCARCH in
+	x86)            BCJ=--x86 ;;
 	powerpc)        BCJ=--powerpc ;;
 	ia64)           BCJ=--ia64; LZMA2OPTS=pb=4 ;;
 	arm)            BCJ=--arm ;;

> Will you get a patch to Linus then to fix all of these in 3.4?

I will. Should the fix be included in the stable trees too? I'm not sure
if this is acceptable under the stable kernel rules. At least someone
should test it on SPARC first.

-- 
Lasse Collin  |  IRC: Larhzu @ IRCnet & Freenode

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

* Re: [PATCH] xz: make use of BCJ filter also for 32-bit x86 kernel
  2012-03-19 12:36     ` Lasse Collin
@ 2012-03-19 12:51       ` Jan Beulich
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2012-03-19 12:51 UTC (permalink / raw)
  To: Lasse Collin; +Cc: linux-kernel

>>> On 19.03.12 at 13:36, Lasse Collin <lasse.collin@tukaani.org> wrote:
> On 2012-03-19 Jan Beulich wrote:
>> >>> On 16.03.12 at 19:47, Lasse Collin <lasse.collin@tukaani.org>
>> >>> wrote:
>> > On 2012-03-15 Jan Beulich wrote:
>> >> The ARCH value for 32-bit x86 is not x86, but i?86.
>> > 
>> > Thanks for noticing this. Is ARCH even the correct variable to use?
>> > Maybe SRCARCH would be better. Then it would be enough to test for
>> > x86, if I understand the toplevel Makefile correctly.
>> 
>> Yes, that might be even better (albeit requiring adjustment of the
>> script should the naming in the source tree ever change again,
>> whereas the ARCH values are supposedly stable).
> 
> I think I will go with SRCARCH then. The directory names don't change so
> often.
> 
> Could you quickly check if the following is OK? It works on x86-64.

Yes, it is.

Acked-by: Jan Beulich <jbeulich@suse.com>

> diff --git a/scripts/xz_wrap.sh b/scripts/xz_wrap.sh
> --- a/scripts/xz_wrap.sh
> +++ b/scripts/xz_wrap.sh
> @@ -12,8 +12,8 @@
>  BCJ=
>  LZMA2OPTS=
>  
> -case $ARCH in
> -	x86|x86_64)     BCJ=--x86 ;;
> +case $SRCARCH in
> +	x86)            BCJ=--x86 ;;
>  	powerpc)        BCJ=--powerpc ;;
>  	ia64)           BCJ=--ia64; LZMA2OPTS=pb=4 ;;
>  	arm)            BCJ=--arm ;;
> 
>> Will you get a patch to Linus then to fix all of these in 3.4?
> 
> I will. Should the fix be included in the stable trees too? I'm not sure
> if this is acceptable under the stable kernel rules.

Neither am I. It's not really critical to get this right, so I'd personally
not consider it a stable candidate.

> At least someone should test it on SPARC first.

Yes.

Thanks, Jan


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

end of thread, other threads:[~2012-03-19 12:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-15 15:45 [PATCH] xz: make use of BCJ filter also for 32-bit x86 kernel Jan Beulich
2012-03-16 18:47 ` Lasse Collin
2012-03-19  8:04   ` Jan Beulich
2012-03-19 12:36     ` Lasse Collin
2012-03-19 12:51       ` Jan Beulich

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.