[PATCH 00/11] Add compression support to pstore
Tony Luck
tony.luck at gmail.com
Thu Aug 8 15:05:41 EST 2013
On Wed, Aug 7, 2013 at 9:29 PM, Aruna Balakrishnaiah
<aruna at linux.vnet.ibm.com> wrote:
> When we preallocate, we can use the same big_buf for compression as well as
> decompression.
> Also workspace will be one for both. By allocating max of inflate workspace
> size and deflate
> workspace size. We can save memory here.
Well decompression isn't a problem. We are doing that in the non-panicing
context of the freshly booted kernel so we can allocate memory without any
worries for this. It's only the compression during panic where we must
pre-allocate. But if the sizes are close to the same, then we might as well
use the same buffers for both (and simplify the code because we don't have
to worry about the kmalloc/kfree bits.
> If pre-allocating close to 50k of buffer is not a issue. We can go ahead
> with this approach.
I never care about allocations measured in *kilo*bytes[1] - the smallest systems
I use have 32GB - so 50K is so far down in the noise of other allocations.
But other types of systems might be more concerned. ERST is generally
only implemented on servers ... so the better question might be:
What are the sizes for the EFI backend (where the buffer size is 1024). It
sounds like it should scale linearly ... so below 8K??? That should not
scare many people. Even phones measure memory in hundreds of MBytes.
-Tony
[1] unless they are per-cpu or per something else that there are a lot of
on a big server - but this is a one-per-system allocation.
More information about the Linuxppc-dev
mailing list