From: Atsushi Kumagai <kumagai-atsushi@mxc.nes.nec.co.jp>
To: muvarov@gmail.com
Cc: d.hatayama@jp.fujitsu.com, kexec@lists.infradead.org,
cpw@sgi.com, bhe@redhat.com
Subject: Re: [PATCH] makedumpfile: reverse -c and -p if using snappy compression
Date: Tue, 10 Sep 2013 16:29:32 +0900 [thread overview]
Message-ID: <522ECA5C.50204@mxc.nes.nec.co.jp> (raw)
In-Reply-To: <CAJGZr0+fo-PhF7vbhR3qky_ab+jSLMF6JorAv+1+H2CBkijSMQ@mail.gmail.com>
Hello Maxim,
(2013/08/30 18:52), Maxim Uvarov wrote:
> I think that better is to have:
>
> -cz zlib
> -cs snappy
> -cl zlo
They are main options for most users, so I don't want to change
them without any important reason.
> -ca - automatic selection of compression. Snappy if compiled in, then
> lzo. And if no snappy and lzo then zlib.
What is the selection standard ? Compression Speed ?
If some users prefer compression ratio to compression speed,
snappy isn't suitable for them.
Each compression format has both good points and bad points,
so each user should select the format manually based on the
purpose in any case.
Thanks
Atsushi Kumagai
> this will make options more readable.
>
> Best regards.
> Maxim.
>
>
> 2013/8/30 Baoquan He <bhe@redhat.com>:
>> USESNAPPY is a switch which the snappy support has been built into.
>> With this flag, it means snappy compression algorithm is available.
>> Which compression algorithm is taken need be decided by -c/-l/-p.
>>
>> If I make a build with USELZO and USESNAPPY, then I want to test
>> zlib/lzo/snappy separately, then this patch will confuse me very
>> much. Current action and configuration are enough for me. So it's
>> better to leave the current action alone.
>>
>> Baoquan
>> Thanks
>>
>> On 08/28/13 at 05:08pm, Cliff Wickman wrote:
>>> From: Cliff Wickman <cpw@sgi.com>
>>>
>>> Reverse the meanings of -c (compression) and -p (snappy compression) if
>>> USESNAPPY is defined.
>>>
>>> The distro kdump scripts seem to only support -c for compression.
>>> So make -c mean snappy compression if it is supported.
>>>
>>> Diffed against makedumpfile-1.5.4
>>> Signed-off-by: Cliff Wickman <cpw@sgi.com>
>>> ---
>>> makedumpfile.c | 10 ++++++++++
>>> print_info.c | 13 +++++++++----
>>> 2 files changed, 19 insertions(+), 4 deletions(-)
>>>
>>> Index: makedumpfile-1.5.4/makedumpfile.c
>>> ===================================================================
>>> --- makedumpfile-1.5.4.orig/makedumpfile.c
>>> +++ makedumpfile-1.5.4/makedumpfile.c
>>> @@ -8607,7 +8607,12 @@ main(int argc, char *argv[])
>>> info->name_filterconfig = optarg;
>>> break;
>>> case 'c':
>>> +#ifdef USESNAPPY
>>> + /* if snappy is available make it the default */
>>> + info->flag_compress = DUMP_DH_COMPRESSED_SNAPPY;
>>> +#else
>>> info->flag_compress = DUMP_DH_COMPRESSED_ZLIB;
>>> +#endif
>>> break;
>>> case 'D':
>>> flag_debug = TRUE;
>>> @@ -8656,7 +8661,12 @@ main(int argc, char *argv[])
>>> info->flag_dmesg = 1;
>>> break;
>>> case 'p':
>>> +#ifdef USESNAPPY
>>> + /* is snappy is available only use zlib with -p */
>>> + info->flag_compress = DUMP_DH_COMPRESSED_ZLIB;
>>> +#else
>>> info->flag_compress = DUMP_DH_COMPRESSED_SNAPPY;
>>> +#endif
>>> break;
>>> case 'P':
>>> info->xen_phys_start = strtoul(optarg, NULL, 0);
>>> Index: makedumpfile-1.5.4/print_info.c
>>> ===================================================================
>>> --- makedumpfile-1.5.4.orig/print_info.c
>>> +++ makedumpfile-1.5.4/print_info.c
>>> @@ -41,9 +41,9 @@ print_usage(void)
>>> #endif
>>> MSG("snappy support:\n");
>>> #ifdef USESNAPPY
>>> - MSG(" enabled\n");
>>> + MSG(" enabled using -c\n");
>>> #else
>>> - MSG(" disabled ('-p' option will be ignored.)\n");
>>> + MSG(" disabled\n");
>>> #endif
>>> MSG("\n");
>>> MSG("Usage:\n");
>>> @@ -90,8 +90,13 @@ print_usage(void)
>>> MSG("\n");
>>> MSG("Available options:\n");
>>> MSG(" [-c|-l|-p]:\n");
>>> - MSG(" Compress dump data by each page using zlib for -c option, lzo for -l option\n");
>>> - MSG(" or snappy for -p option. A user cannot specify either of these options with\n");
>>> +#ifdef USESNAPPY
>>> + MSG(" Compress dump data by each page using zlib for -p option, lzo for -l option\n");
>>> + MSG(" or snappy for -c option. A user cannot specify any of these options with\n");
>>> +#else
>>> + MSG(" Compress dump data by each page using zlib for -c option or lzo for -l option\n");
>>> + MSG(" A user cannot specify either of these options with\n");
>>> +#endif
>>> MSG(" -E option, because the ELF format does not support compressed data.\n");
>>> MSG(" THIS IS ONLY FOR THE CRASH UTILITY.\n");
>>> MSG("\n");
>>>
>>> _______________________________________________
>>> kexec mailing list
>>> kexec@lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/kexec
>>
>> _______________________________________________
>> kexec mailing list
>> kexec@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kexec
>
>
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2013-09-10 7:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 22:08 [PATCH] makedumpfile: reverse -c and -p if using snappy compression Cliff Wickman
2013-08-29 2:58 ` WANG Chao
2013-08-29 18:46 ` Cliff Wickman
2013-08-30 10:33 ` WANG Chao
2013-09-10 7:29 ` Atsushi Kumagai
2013-08-30 3:34 ` Baoquan He
2013-08-30 9:52 ` Maxim Uvarov
2013-09-10 7:29 ` Atsushi Kumagai [this message]
2013-09-10 8:25 ` Maxim Uvarov
2013-09-10 9:57 ` HATAYAMA Daisuke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=522ECA5C.50204@mxc.nes.nec.co.jp \
--to=kumagai-atsushi@mxc.nes.nec.co.jp \
--cc=bhe@redhat.com \
--cc=cpw@sgi.com \
--cc=d.hatayama@jp.fujitsu.com \
--cc=kexec@lists.infradead.org \
--cc=muvarov@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox