lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v8 6/7] x86: Add support for ZSTD compressed kernel
Date


> On Jul 24, 2020, at 5:26 AM, Ingo Molnar <mingo@kernel.org> wrote:
>
>
> * Nick Terrell <nickrterrell@gmail.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?

Yup, the next version will include an explanation. Thanks for the review!

\
 
 \ /
  Last update: 2020-07-28 00:45    [W:0.155 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site