s390x implements zlib/dfltcc dedicated instruction to improve compression speed and ratio. Switching from 'makedumpfile -l' to 'makedumpfile -c' to benifit from this feature.
Signed-off-by: Pingfan Liu piliu@redhat.com --- kexec-tools.spec | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kexec-tools.spec b/kexec-tools.spec index 6673000..9f1ba34 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -275,6 +275,10 @@ fi %systemd_post kdump.service
touch /etc/kdump.conf +# s390 uses zlib/dfltcc as default to improve compression speed and ratio +%ifarch s390x +sed -i 's/makedumpfile -l/makedumpfile -c/' /etc/kdump.conf +%endif
%ifarch ppc64 ppc64le servicelog_notify --remove --command=/usr/lib/kdump/kdump-migrate-action.sh 2>/dev/null
Hi Pingfan,
On Fri, 29 Apr 2022 15:37:40 +0800 Pingfan Liu piliu@redhat.com wrote:
s390x implements zlib/dfltcc dedicated instruction to improve compression speed and ratio. Switching from 'makedumpfile -l' to 'makedumpfile -c' to benifit from this feature.
Signed-off-by: Pingfan Liu piliu@redhat.com
kexec-tools.spec | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kexec-tools.spec b/kexec-tools.spec index 6673000..9f1ba34 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -275,6 +275,10 @@ fi %systemd_post kdump.service
touch /etc/kdump.conf +# s390 uses zlib/dfltcc as default to improve compression speed and ratio +%ifarch s390x +sed -i 's/makedumpfile -l/makedumpfile -c/' /etc/kdump.conf +%endif
%ifarch ppc64 ppc64le servicelog_notify --remove --command=/usr/lib/kdump/kdump-migrate-action.sh 2>/dev/null
I don't think this approach will work as expected. My biggest concern is that the sed call is executed even when no kdump.conf is installed. So if a user changed the option back to -l the change will be reverted when updating kexec-tools. Personally I think we should follow what Kairui suggested for the sysconfig. I.e. update the config during %build and package the already correct kdump.conf.
Thanks Philipp
On Wed, May 4, 2022 at 8:41 PM Philipp Rudo prudo@redhat.com wrote:
Hi Pingfan,
On Fri, 29 Apr 2022 15:37:40 +0800 Pingfan Liu piliu@redhat.com wrote:
s390x implements zlib/dfltcc dedicated instruction to improve compression speed and ratio. Switching from 'makedumpfile -l' to 'makedumpfile -c' to benifit from this feature.
Signed-off-by: Pingfan Liu piliu@redhat.com
kexec-tools.spec | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kexec-tools.spec b/kexec-tools.spec index 6673000..9f1ba34 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -275,6 +275,10 @@ fi %systemd_post kdump.service
touch /etc/kdump.conf +# s390 uses zlib/dfltcc as default to improve compression speed and ratio +%ifarch s390x +sed -i 's/makedumpfile -l/makedumpfile -c/' /etc/kdump.conf +%endif
%ifarch ppc64 ppc64le servicelog_notify --remove --command=/usr/lib/kdump/kdump-migrate-action.sh 2>/dev/null
I don't think this approach will work as expected. My biggest concern is that the sed call is executed even when no kdump.conf is installed. So if a user changed the option back to -l the change will be reverted when updating kexec-tools.
A persuading example.
Personally I think we should follow what Kairui suggested for the sysconfig. I.e. update the config during %build and package the already correct kdump.conf.
Yes, it is a better choice. I will go that way.
Thanks,
Pingfan
On Fri, Apr 29, 2022 at 03:37:40PM +0800, Pingfan Liu wrote:
s390x implements zlib/dfltcc dedicated instruction to improve compression speed and ratio. Switching from 'makedumpfile -l' to 'makedumpfile -c' to benifit from this feature.
Signed-off-by: Pingfan Liu piliu@redhat.com
kexec-tools.spec | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kexec-tools.spec b/kexec-tools.spec index 6673000..9f1ba34 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -275,6 +275,10 @@ fi %systemd_post kdump.service
touch /etc/kdump.conf
As a side question, why do we run "touch /etc/kdump.conf" since we have already installed /etc/kdump.conf?
+# s390 uses zlib/dfltcc as default to improve compression speed and ratio +%ifarch s390x +sed -i 's/makedumpfile -l/makedumpfile -c/' /etc/kdump.conf +%endif
Does this change contradict the RPM config policy as defined in %config(noreplace,missingok) %verify(not mtime) %{_sysconfdir}/kdump.conf?
%ifarch ppc64 ppc64le servicelog_notify --remove --command=/usr/lib/kdump/kdump-migrate-action.sh 2>/dev/null -- 2.31.1
On Thu, May 5, 2022 at 9:30 AM Coiby Xu coxu@redhat.com wrote:
On Fri, Apr 29, 2022 at 03:37:40PM +0800, Pingfan Liu wrote:
s390x implements zlib/dfltcc dedicated instruction to improve compression speed and ratio. Switching from 'makedumpfile -l' to 'makedumpfile -c' to benifit from this feature.
Signed-off-by: Pingfan Liu piliu@redhat.com
kexec-tools.spec | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kexec-tools.spec b/kexec-tools.spec index 6673000..9f1ba34 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -275,6 +275,10 @@ fi %systemd_post kdump.service
touch /etc/kdump.conf
As a side question, why do we run "touch /etc/kdump.conf" since we have already installed /etc/kdump.conf?
Sorry that I can not answer this question. I search the history, in rhel-6.9 branch, It is introduced by the following commit, without why.
commit 74ba561a519b813424693bcf13f77ad7cacc02ee Author: nhorman nhorman@redhat.com Date: Thu Jul 20 03:36:18 2006 +0000
adding kexec frontend
SKIPPED: Makefile Makefile.kcp kexec-tools-1.101-Makefile-kcp.patch
+# s390 uses zlib/dfltcc as default to improve compression speed and ratio +%ifarch s390x +sed -i 's/makedumpfile -l/makedumpfile -c/' /etc/kdump.conf +%endif
Does this change contradict the RPM config policy as defined in %config(noreplace,missingok) %verify(not mtime) %{_sysconfdir}/kdump.conf?
For 'noreplace', I see the contradiction as Philipp pointed out.
Thanks,
Pingfan