libdb/SOURCES/db-5.3.28-mmap-high-cpu-usa...

30 lines
1.0 KiB
Diff
Raw Normal View History

2021-09-09 06:18:58 +00:00
Author: Filip Januš <fjanus@redhat.com>
Date: 6 Sep 2021
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1992402
2021-09-10 08:19:41 +00:00
Changing the size to max if set in the environment.
Do it also every-time on aarch64 as this issue caused rpm to hang staring 8.4.0
(likely influenced by changes in other components) and rpm is not able to set
the environment this way.
2021-09-09 06:18:58 +00:00
diff -ur db-5.3.28/src/os/os_map.c db-patched/src/os/os_map.c
--- db-5.3.28/src/os/os_map.c 2013-09-09 17:35:09.000000000 +0200
2021-09-10 08:19:41 +00:00
+++ db-patched/src/os/os_map.c 2021-09-08 21:45:16.914146219 +0200
@@ -213,7 +213,14 @@
2021-09-09 06:18:58 +00:00
if (rp->max < rp->size)
rp->max = rp->size;
if (ret == 0 && F_ISSET(infop, REGION_CREATE)) {
2021-09-10 08:19:41 +00:00
- if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
2021-09-09 06:18:58 +00:00
+#ifdef HAVE_MLOCK
+ if (F_ISSET(env, ENV_LOCKDOWN))
+ rp->size = rp->max;
+#endif
2021-09-10 08:19:41 +00:00
+#if defined(__aarch64__)
+ rp->size = rp->max;
+#endif
+ if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
2021-09-09 06:18:58 +00:00
ret = __db_file_write(env, infop->fhp,
rp->size / MEGABYTE, rp->size % MEGABYTE, 0x00);
2021-09-10 08:19:41 +00:00
else