pstore: Adjust buffer size for compression for smaller registered buffers
pstore: Adjust buffer size for compression for smaller registered buffers

When backends (ex: efivars) have smaller registered buffers, the
big_oops_buf is too big for them as number of repeated occurences
in the text captured will be less. What happens is that pstore takes
too big a bite from the dmesg log and then finds it cannot compress it
enough to meet the backend block size. Patch takes care of adjusting
the buffer size based on the registered buffer size. cmpr values have
been arrived after doing experiments with plain text for buffers of
size 1k - 4k (Smaller the buffer size repeated occurence will be less)
and with sample crash log for buffers ranging from 4k - 10k.

Reported-by: Seiji Aguchi <3bab11a9318ee669e0dd28af4ddfc6d4bd42b158@hds.com>
Tested-by: Seiji Aguchi <3bab11a9318ee669e0dd28af4ddfc6d4bd42b158@hds.com>
Signed-off-by: Aruna Balakrishnaiah <ab969200bf8a209ae3a660c857a29117d9771707@linux.vnet.ibm.com>
Signed-off-by: Tony Luck <e7984595ec0368ff920a7b3521dc7093683f6f26@intel.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs