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