public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Don't auto-enable _flush_io on non-rotational media, it's too costly
Date: Mon, 23 Nov 2026 09:33:25 GMT [thread overview]
Message-ID: <179542640513.1.12578081477366608514.rpms-rpm-220819b9e7ca@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : 220819b9e7ca1532e4ec9b55a9845c8f281fa62e
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2020-06-03T10:25:34+03:00
Stats : +39/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/220819b9e7ca1532e4ec9b55a9845c8f281fa62e?branch=pmatilai-v6
Log:
Don't auto-enable _flush_io on non-rotational media, it's too costly
---
diff --git a/0001-Don-t-auto-enable-IO-flushing-on-non-rotational-disk.patch b/0001-Don-t-auto-enable-IO-flushing-on-non-rotational-disk.patch
new file mode 100644
index 0000000..888d17b
--- /dev/null
+++ b/0001-Don-t-auto-enable-IO-flushing-on-non-rotational-disk.patch
@@ -0,0 +1,34 @@
+From ca78aff0bcf36b480e9776535ab3e74dbb5a8f50 Mon Sep 17 00:00:00 2001
+Message-Id: <ca78aff0bcf36b480e9776535ab3e74dbb5a8f50.1591169016.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Wed, 3 Jun 2020 10:17:33 +0300
+Subject: [PATCH] Don't auto-enable IO flushing on non-rotational disks
+
+Commit 47e2463d8a98a7535e141d59d17be17d5a30862c added logic to enable
+%_flush_io automatically on non-rotational disks to avoid trashing system
+caches and IO peaks on the grounds that this isn't so expensive on SSD,
+but real world experience suggests otherwise. Install times go from
+seconds to minutes which might not matter for the random individual system
+but for build systems and the like churning away continuously...
+---
+ lib/transaction.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/lib/transaction.c b/lib/transaction.c
+index 49b564f8d..1156bb9f5 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -1478,10 +1478,8 @@ static void setSSD(int enable)
+ if (enable) {
+ rpmlog(RPMLOG_DEBUG, "optimizing for non-rotational disks\n");
+ ensureMacro("_minimize_writes", "1");
+- ensureMacro("_flush_io", "1");
+ } else {
+ rpmPopMacro(NULL, "_minimize_writes");
+- rpmPopMacro(NULL, "_flush_io");
+ }
+ }
+
+--
+2.26.2
+
diff --git a/rpm.spec b/rpm.spec
index 263f263..ca554ef 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -25,7 +25,7 @@
%global rpmver 4.16.0
%global snapver beta1
-%global rel 1
+%global rel 2
%global srcver %{rpmver}%{?snapver:-%{snapver}}
%global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{rpmver} | cut -d'.' -f1-2).x}
@@ -59,6 +59,7 @@ Patch5: rpm-4.12.0-rpm2cpio-hack.patch
Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
# Patches already upstream:
+Patch100: 0001-Don-t-auto-enable-IO-flushing-on-non-rotational-disk.patch
# These are not yet upstream
Patch906: rpm-4.7.1-geode-i686.patch
@@ -552,6 +553,9 @@ fi
%doc doc/librpm/html/*
%changelog
+* Wed Jun 3 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-0.beta1.2
+- Don't auto-enable _flush_io on non-rotational media, it's too costly
+
* Mon Jun 1 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-0.beta1.1
- Rebase to rpm 4.16.0-beta1
reply other threads:[~2026-11-23 9:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=179542640513.1.12578081477366608514.rpms-rpm-220819b9e7ca@fedoraproject.org \
--to=pmatilai@redhat.com \
--cc=git-commits@fedoraproject.org \
/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