Improve db-5.3.28-mmap-high-cpu-usage.patch to cover more cases
This commit is contained in:
parent
316f3195dc
commit
91f5ca6fc8
@ -1,18 +1,19 @@
|
|||||||
Author: Filip Januš <fjanus@redhat.com>
|
Author: Filip Januš <fjanus@redhat.com>
|
||||||
Date: 6 Sep 2021
|
Date: 6 Sep 2021
|
||||||
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1992402
|
Related: https://bugzilla.redhat.com/show_bug.cgi?id=1992402
|
||||||
|
Patch was created based on the discussion in the previous link
|
||||||
diff -ur db-5.3.28/src/os/os_map.c db-patched/src/os/os_map.c
|
diff -ur db-5.3.28/src/os/os_map.c db_patch/src/os/os_map.c
|
||||||
--- db-5.3.28/src/os/os_map.c 2013-09-09 17:35:09.000000000 +0200
|
--- db-5.3.28/src/os/os_map.c 2013-09-09 17:35:09.000000000 +0200
|
||||||
+++ db-patched/src/os/os_map.c 2021-09-06 14:32:28.792139908 +0200
|
+++ db_patch/src/os/os_map.c 2021-09-09 07:33:12.027328265 +0200
|
||||||
@@ -213,6 +213,10 @@
|
@@ -213,7 +213,10 @@
|
||||||
if (rp->max < rp->size)
|
if (rp->max < rp->size)
|
||||||
rp->max = rp->size;
|
rp->max = rp->size;
|
||||||
if (ret == 0 && F_ISSET(infop, REGION_CREATE)) {
|
if (ret == 0 && F_ISSET(infop, REGION_CREATE)) {
|
||||||
+#ifdef HAVE_MLOCK
|
- if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
|
||||||
+ if (F_ISSET(env, ENV_LOCKDOWN))
|
+
|
||||||
+ rp->size = rp->max;
|
+ rp->max = rp->size;
|
||||||
+#endif
|
+
|
||||||
if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
|
+ if (F_ISSET(dbenv, DB_ENV_REGION_INIT))
|
||||||
ret = __db_file_write(env, infop->fhp,
|
ret = __db_file_write(env, infop->fhp,
|
||||||
rp->size / MEGABYTE, rp->size % MEGABYTE, 0x00);
|
rp->size / MEGABYTE, rp->size % MEGABYTE, 0x00);
|
||||||
|
else
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
Summary: The Berkeley DB database library for C
|
Summary: The Berkeley DB database library for C
|
||||||
Name: libdb
|
Name: libdb
|
||||||
Version: 5.3.28
|
Version: 5.3.28
|
||||||
Release: 48%{?dist}
|
Release: 49%{?dist}
|
||||||
Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz
|
Source0: http://download.oracle.com/berkeley-db/db-%{version}.tar.gz
|
||||||
Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz
|
Source1: http://download.oracle.com/berkeley-db/db.1.85.tar.gz
|
||||||
# For mt19937db.c
|
# For mt19937db.c
|
||||||
@ -389,7 +389,10 @@ mv man/* ${RPM_BUILD_ROOT}%{_mandir}/man1
|
|||||||
%{_includedir}/%{name}/dbsql.h
|
%{_includedir}/%{name}/dbsql.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Sep 6 2021 Filip Januš <fjanus@redhat.com> 5.3.28-48
|
* Tue Sep 15 2021 Filip Januš <fjanus@redhat.com> - 5.3.28-49
|
||||||
|
- Improve previous (patch 41) to cover more cases
|
||||||
|
|
||||||
|
* Mon Sep 14 2021 Filip Januš <fjanus@redhat.com> - 5.3.28-48
|
||||||
- Bad order of sys calls cause high CPU usage
|
- Bad order of sys calls cause high CPU usage
|
||||||
- Related: #1992402
|
- Related: #1992402
|
||||||
- Patch no. 41 was added
|
- Patch no. 41 was added
|
||||||
|
Loading…
Reference in New Issue
Block a user