[Skiboot] [PATCH 2/2] imc/catalog: Decompress catalog asynchronously

Stewart Smith stewart at linux.ibm.com
Tue Feb 26 17:07:27 AEDT 2019

Santosh Sivaraj <santosh at fossix.org> writes:

> In-Memory Collection(IMC) counters catalog is compressed blob which is
> loaded from the flash; decompression starts once the data is loaded from
> nvram by the main thread. This can be optimized by using the libxz API
> function which creates a job to do the decompression by not blocking the
> main thread.
> Refactor decompress() to use the libxz asynchronous wrapper
> functions. This also cleans up the error handling path in imc_init().
> CC: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
> Signed-off-by: Santosh Sivaraj <santosh at fossix.org>
> ---
>  core/init.c   |   3 ++
>  hw/imc.c      | 141 ++++++++++++++++++++------------------------------
>  include/imc.h |   1 +
>  3 files changed, 61 insertions(+), 84 deletions(-)
> diff --git a/core/init.c b/core/init.c
> index 262ac5fb..adf515f8 100644
> --- a/core/init.c
> +++ b/core/init.c
> @@ -1153,6 +1153,9 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
>  	preload_capp_ucode();
>  	start_preload_kernel();
> +	/* Catalog decompression routine */
> +	imc_decompress_catalog();

My nitpick with how this solution works is that we end up having a
synchronisation point here where we have to wait for the IMA_CATALOG
partition to be loaded before we continue with our init process.

I had the idea perhaps we could link into some of the lower routines and
do things there, but everything looks to be a bit more annoying and

So, I've taken this series as is for now and we can clean things up a
bit in the future.

Merged to master as of c86fb12c07a6dc7d878503c1d8ff2de705bf61d7

Stewart Smith
OPAL Architect, IBM.

More information about the Skiboot mailing list