[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200724122640.GC632343@gmail.com>
Date: Fri, 24 Jul 2020 14:26:40 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Nick Terrell <nickrterrell@...il.com>
Cc: Borislav Petkov <bp@...en8.de>,
Thomas Gleixner <tglx@...utronix.de>,
linux-kernel@...r.kernel.org, Chris Mason <clm@...com>,
linux-kbuild@...r.kernel.org, x86@...nel.org,
gregkh@...uxfoundation.org, Petr Malat <oss@...at.biz>,
Kees Cook <keescook@...omium.org>,
Kernel Team <Kernel-team@...com>,
Adam Borowski <kilobyte@...band.pl>,
Patrick Williams <patrickw3@...com>, rmikey@...com,
Patrick Williams <patrick@...cx.xyz>,
Sedat Dilek <sedat.dilek@...il.com>,
Norbert Lange <nolange79@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Alex Xu <alex_y_xu@...oo.ca>,
Arvind Sankar <nivedita@...m.mit.edu>,
Nick Terrell <terrelln@...com>
Subject: Re: [PATCH v8 6/7] x86: Add support for ZSTD compressed kernel
* Nick Terrell <nickrterrell@...il.com> wrote:
> --- a/arch/x86/boot/compressed/misc.c
> +++ b/arch/x86/boot/compressed/misc.c
> @@ -12,6 +12,11 @@
> * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996
> */
>
> +/* decompressors bring in EXPORT_SYMBOL which is meaningless and will
> + * cause compiler errors in some cases.
> + */
> +#define __DISABLE_EXPORTS
> +
> #include "misc.h"
> #include "error.h"
> #include "pgtable.h"
> @@ -77,6 +82,10 @@ static int lines, cols;
> #ifdef CONFIG_KERNEL_LZ4
> #include "../../../../lib/decompress_unlz4.c"
> #endif
> +
> +#ifdef CONFIG_KERNEL_ZSTD
> +#include "../../../../lib/decompress_unzstd.c"
> +#endif
> /*
> * NOTE: When adding a new decompressor, please update the analysis in
> * ../header.S.
> diff --git a/arch/x86/include/asm/boot.h b/arch/x86/include/asm/boot.h
> index 680c320363db..d6dd43d25d9f 100644
> --- a/arch/x86/include/asm/boot.h
> +++ b/arch/x86/include/asm/boot.h
> @@ -24,9 +24,11 @@
> # error "Invalid value for CONFIG_PHYSICAL_ALIGN"
> #endif
>
> -#ifdef CONFIG_KERNEL_BZIP2
> +#if defined(CONFIG_KERNEL_BZIP2)
> # define BOOT_HEAP_SIZE 0x400000
> -#else /* !CONFIG_KERNEL_BZIP2 */
> +#elif defined(CONFIG_KERNEL_ZSTD)
> +# define BOOT_HEAP_SIZE 0x30000
> +#else
> # define BOOT_HEAP_SIZE 0x10000
> #endif
So the other patches explain why the decompression buffer extra space
was increased from 64k to 128k, but is there a similar
calculation/estimate for bumping BOOT_HEAD_SIZE from 64k to 192k?
Admittedly the BZ2 exception doesn't set a good example, but maybe we
can do this for ZSTD?
Thanks,
Ingo
Powered by blists - more mailing lists