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