linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add option to disable kernel compression
@ 2013-04-09 11:49 Christian Ruppert
  2013-04-11  7:38 ` Vineet Gupta
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Ruppert @ 2013-04-09 11:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Eric W. Biederman, Serge Hallyn, Paul E. McKenney,
	David S. Miller, Frederic Weisbecker, Vineet Gupta, Noam Camus,
	pierrick hascoet, Christian Ruppert

Until now, kernel compression can only be disabled by deselecting
HAVE_<compression> in the architecture Kconfig. However, some
users/platforms within the same architecture might want to use
compression while others might want to disable it.
This patch is a solution to the dilemma.

Signed-off-by: Christian Ruppert <christian.ruppert@abilis.com>
---
 init/Kconfig |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index 5341d72..0924c51 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -101,7 +101,6 @@ config HAVE_KERNEL_LZO
 choice
 	prompt "Kernel compression mode"
 	default KERNEL_GZIP
-	depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO
 	help
 	  The linux kernel is a kind of self-extracting executable.
 	  Several compression algorithms are available, which differ
@@ -120,6 +119,13 @@ choice
 
 	  If in doubt, select 'gzip'
 
+config KERNEL_UNCOMPRESSED
+	bool "No compression"
+	help
+	  No compression at all. The kernel is huge but the compression and
+	  decompression times are zero.
+	  This is usually not what you want.
+
 config KERNEL_GZIP
 	bool "Gzip"
 	depends on HAVE_KERNEL_GZIP
-- 
1.7.1


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

* Re: [PATCH] Add option to disable kernel compression
  2013-04-09 11:49 [PATCH] Add option to disable kernel compression Christian Ruppert
@ 2013-04-11  7:38 ` Vineet Gupta
  2013-04-11  7:46   ` Alexander Stein
  0 siblings, 1 reply; 6+ messages in thread
From: Vineet Gupta @ 2013-04-11  7:38 UTC (permalink / raw)
  To: Christian Ruppert
  Cc: linux-kernel, Eric W. Biederman, Serge Hallyn, Paul E. McKenney,
	David S. Miller, Frederic Weisbecker, Vineet Gupta, Noam Camus,
	pierrick hascoet

On 04/09/2013 05:19 PM, Christian Ruppert wrote:
> Until now, kernel compression can only be disabled by deselecting
> HAVE_<compression> in the architecture Kconfig. However, some
> users/platforms within the same architecture might want to use
> compression while others might want to disable it.
> This patch is a solution to the dilemma.
>
> Signed-off-by: Christian Ruppert <christian.ruppert@abilis.com>
> ---
>  init/Kconfig |    8 +++++++-
>  1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index 5341d72..0924c51 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -101,7 +101,6 @@ config HAVE_KERNEL_LZO
>  choice
>  	prompt "Kernel compression mode"
>  	default KERNEL_GZIP
> -	depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO
>  	help
>  	  The linux kernel is a kind of self-extracting executable.
>  	  Several compression algorithms are available, which differ
> @@ -120,6 +119,13 @@ choice
>  
>  	  If in doubt, select 'gzip'
>  
> +config KERNEL_UNCOMPRESSED
> +	bool "No compression"

> +	help
> +	  No compression at all. The kernel is huge but the compression and
> +	  decompression times are zero.
> +	  This is usually not what you want.
> +
>  config KERNEL_GZIP
>  	bool "Gzip"
>  	depends on HAVE_KERNEL_GZIP

FWIW, this is an issue for ARC port where one of our platforms runs on a very slow
FPGA, hence doesn't want to spend time uncompressing the image - while others do
want the gzip.

Reviewed-by: Vineet Gupta <vgupta@synopsys.com>

Thx,
-Vineet

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

* Re: [PATCH] Add option to disable kernel compression
  2013-04-11  7:38 ` Vineet Gupta
@ 2013-04-11  7:46   ` Alexander Stein
  2013-10-08 12:33     ` [PATCH REBASE] " Christian Ruppert
  0 siblings, 1 reply; 6+ messages in thread
From: Alexander Stein @ 2013-04-11  7:46 UTC (permalink / raw)
  To: Vineet Gupta
  Cc: Christian Ruppert, linux-kernel, Eric W. Biederman, Serge Hallyn,
	Paul E. McKenney, David S. Miller, Frederic Weisbecker,
	Noam Camus, pierrick hascoet

Hello,

On Thursday 11 April 2013 13:08:08, Vineet Gupta wrote:
> On 04/09/2013 05:19 PM, Christian Ruppert wrote:
> > Until now, kernel compression can only be disabled by deselecting
> > HAVE_<compression> in the architecture Kconfig. However, some
> > users/platforms within the same architecture might want to use
> > compression while others might want to disable it.
> > This patch is a solution to the dilemma.
> >
> > Signed-off-by: Christian Ruppert <christian.ruppert@abilis.com>
> > ---
> >  init/Kconfig |    8 +++++++-
> >  1 files changed, 7 insertions(+), 1 deletions(-)
> >
> > diff --git a/init/Kconfig b/init/Kconfig
> > index 5341d72..0924c51 100644
> > --- a/init/Kconfig
> > +++ b/init/Kconfig
> > @@ -101,7 +101,6 @@ config HAVE_KERNEL_LZO
> >  choice
> >  	prompt "Kernel compression mode"
> >  	default KERNEL_GZIP
> > -	depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO
> >  	help
> >  	  The linux kernel is a kind of self-extracting executable.
> >  	  Several compression algorithms are available, which differ
> > @@ -120,6 +119,13 @@ choice
> >  
> >  	  If in doubt, select 'gzip'
> >  
> > +config KERNEL_UNCOMPRESSED
> > +	bool "No compression"
> 
> > +	help
> > +	  No compression at all. The kernel is huge but the compression and
> > +	  decompression times are zero.
> > +	  This is usually not what you want.
> > +
> >  config KERNEL_GZIP
> >  	bool "Gzip"
> >  	depends on HAVE_KERNEL_GZIP
> 
> FWIW, this is an issue for ARC port where one of our platforms runs on a very slow
> FPGA, hence doesn't want to spend time uncompressing the image - while others do
> want the gzip.
> 
> Reviewed-by: Vineet Gupta <vgupta@synopsys.com>

Even some other platforms, e.g. ARM you want no compression, if you can effort the additional space, if you want to boot extremely fast.

Best regards,
Alexander


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

* [PATCH REBASE] Add option to disable kernel compression
  2013-04-11  7:46   ` Alexander Stein
@ 2013-10-08 12:33     ` Christian Ruppert
  2013-10-08 19:29       ` Andrew Morton
  0 siblings, 1 reply; 6+ messages in thread
From: Christian Ruppert @ 2013-10-08 12:33 UTC (permalink / raw)
  To: linux-kernel
  Cc: alexander.stein, Vineet Gupta, Eric W. Biederman, Serge Hallyn,
	Paul E. McKenney, David S. Miller, Frederic Weisbecker,
	Noam Camus, pierrick hascoet, Andrew Morton, Christian Ruppert

Until now, kernel compression can only be disabled by deselecting
HAVE_<compression> in the architecture Kconfig. However, some
users/platforms within the same architecture might want to use
compression while others might want to disable it.
This patch is a solution to the dilemma.

Signed-off-by: Christian Ruppert <christian.ruppert@abilis.com>
---
 init/Kconfig |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/init/Kconfig b/init/Kconfig
index fed81b5..7db419b 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -118,7 +118,6 @@ config HAVE_KERNEL_LZ4
 choice
 	prompt "Kernel compression mode"
 	default KERNEL_GZIP
-	depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4
 	help
 	  The linux kernel is a kind of self-extracting executable.
 	  Several compression algorithms are available, which differ
@@ -137,6 +136,13 @@ choice
 
 	  If in doubt, select 'gzip'
 
+config KERNEL_UNCOMPRESSED
+	bool "No compression"
+	help
+	  No compression at all. The kernel is huge but the compression and
+	  decompression times are zero.
+	  This is usually not what you want.
+
 config KERNEL_GZIP
 	bool "Gzip"
 	depends on HAVE_KERNEL_GZIP
-- 
1.7.1


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

* Re: [PATCH REBASE] Add option to disable kernel compression
  2013-10-08 12:33     ` [PATCH REBASE] " Christian Ruppert
@ 2013-10-08 19:29       ` Andrew Morton
  2013-10-09  8:02         ` Christian Ruppert
  0 siblings, 1 reply; 6+ messages in thread
From: Andrew Morton @ 2013-10-08 19:29 UTC (permalink / raw)
  To: Christian Ruppert
  Cc: linux-kernel, alexander.stein, Vineet Gupta, Eric W. Biederman,
	Serge Hallyn, Paul E. McKenney, David S. Miller,
	Frederic Weisbecker, Noam Camus, pierrick hascoet

On Tue,  8 Oct 2013 14:33:32 +0200 Christian Ruppert <christian.ruppert@abilis.com> wrote:

> Until now, kernel compression can only be disabled by deselecting
> HAVE_<compression> in the architecture Kconfig.

Scratching my head a bit.  There's no way of deselecting these things. 
I *think* you mean "by editing arch/xxx/Kconfig and removing all the
"select HAVE_KERNEL_<compression>" lines"?

> However, some
> users/platforms within the same architecture might want to use
> compression while others might want to disable it.

Why would anyone want to run an uncompressed kernel, btw?  Boot time?

> This patch is a solution to the dilemma.
> 
> ...
>
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -118,7 +118,6 @@ config HAVE_KERNEL_LZ4
>  choice
>  	prompt "Kernel compression mode"
>  	default KERNEL_GZIP
> -	depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4
>  	help
>  	  The linux kernel is a kind of self-extracting executable.
>  	  Several compression algorithms are available, which differ
> @@ -137,6 +136,13 @@ choice
>  
>  	  If in doubt, select 'gzip'
>  
> +config KERNEL_UNCOMPRESSED
> +	bool "No compression"
> +	help
> +	  No compression at all. The kernel is huge but the compression and
> +	  decompression times are zero.
> +	  This is usually not what you want.
> +
>  config KERNEL_GZIP
>  	bool "Gzip"
>  	depends on HAVE_KERNEL_GZIP

It's odd to create CONFIG_KERNEL_UNCOMPRESSED and not use it for
anything, but I guess Kconfig's `choice' forces this.



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

* Re: [PATCH REBASE] Add option to disable kernel compression
  2013-10-08 19:29       ` Andrew Morton
@ 2013-10-09  8:02         ` Christian Ruppert
  0 siblings, 0 replies; 6+ messages in thread
From: Christian Ruppert @ 2013-10-09  8:02 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-kernel, alexander.stein, Vineet Gupta, Eric W. Biederman,
	Serge Hallyn, Paul E. McKenney, David S. Miller,
	Frederic Weisbecker, Noam Camus, pierrick hascoet

On Tue, Oct 08, 2013 at 12:29:40PM -0700, Andrew Morton wrote:
> On Tue,  8 Oct 2013 14:33:32 +0200 Christian Ruppert <christian.ruppert@abilis.com> wrote:
> 
> > Until now, kernel compression can only be disabled by deselecting
> > HAVE_<compression> in the architecture Kconfig.
> 
> Scratching my head a bit.  There's no way of deselecting these things. 
> I *think* you mean "by editing arch/xxx/Kconfig and removing all the
> "select HAVE_KERNEL_<compression>" lines"?

Exactly. I actually meant "not selecting" instead of deselecting. In
practise this comes down to editing arch/xxx/Kconfig and removing (or
adding) the respective HAVE_KERNEL_<compression> lines.

> > However, some
> > users/platforms within the same architecture might want to use
> > compression while others might want to disable it.
> 
> Why would anyone want to run an uncompressed kernel, btw?  Boot time?

Originally, the patch was developed because we wanted to compress the
kernel but other users of the ARC architecture didn't. We now have
customers of both camps ourselves, some say they can boot faster with
compression and some say they can boot faster without compression. This
probably depends on things like the FLASH chip they use etc.

> > This patch is a solution to the dilemma.
> > 
> > ...
> >
> > --- a/init/Kconfig
> > +++ b/init/Kconfig
> > @@ -118,7 +118,6 @@ config HAVE_KERNEL_LZ4
> >  choice
> >  	prompt "Kernel compression mode"
> >  	default KERNEL_GZIP
> > -	depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4
> >  	help
> >  	  The linux kernel is a kind of self-extracting executable.
> >  	  Several compression algorithms are available, which differ
> > @@ -137,6 +136,13 @@ choice
> >  
> >  	  If in doubt, select 'gzip'
> >  
> > +config KERNEL_UNCOMPRESSED
> > +	bool "No compression"
> > +	help
> > +	  No compression at all. The kernel is huge but the compression and
> > +	  decompression times are zero.
> > +	  This is usually not what you want.
> > +
> >  config KERNEL_GZIP
> >  	bool "Gzip"
> >  	depends on HAVE_KERNEL_GZIP
> 
> It's odd to create CONFIG_KERNEL_UNCOMPRESSED and not use it for
> anything, but I guess Kconfig's `choice' forces this.

I haven't found another way to do this but I'd be happy to send an
update if someone can point me to a cleaner implementation.

Greetings,
  Christian

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

end of thread, other threads:[~2013-10-09  8:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-09 11:49 [PATCH] Add option to disable kernel compression Christian Ruppert
2013-04-11  7:38 ` Vineet Gupta
2013-04-11  7:46   ` Alexander Stein
2013-10-08 12:33     ` [PATCH REBASE] " Christian Ruppert
2013-10-08 19:29       ` Andrew Morton
2013-10-09  8:02         ` Christian Ruppert

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).