[oe-commits] [openembedded-core] 46/62: rpm: add a patch to help with Docker performance issues
git at git.openembedded.org
git at git.openembedded.org
Tue Feb 6 11:07:47 UTC 2018
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit 6f1822e5f1eaafd8bc46e999de730c1fcca77f3a
Author: Alexander Kanavin <alexander.kanavin at linux.intel.com>
AuthorDate: Thu Feb 1 20:01:53 2018 +0200
rpm: add a patch to help with Docker performance issues
Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
Signed-off-by: Ross Burton <ross.burton at intel.com>
---
...FD_CLOEXEC-on-opened-files-before-exec-fr.patch | 49 ++++++++++++++++++++++
meta/recipes-devtools/rpm/rpm_4.14.1.bb | 1 +
2 files changed, 50 insertions(+)
diff --git a/meta/recipes-devtools/rpm/files/0001-Revert-Set-FD_CLOEXEC-on-opened-files-before-exec-fr.patch b/meta/recipes-devtools/rpm/files/0001-Revert-Set-FD_CLOEXEC-on-opened-files-before-exec-fr.patch
new file mode 100644
index 0000000..4651409
--- /dev/null
+++ b/meta/recipes-devtools/rpm/files/0001-Revert-Set-FD_CLOEXEC-on-opened-files-before-exec-fr.patch
@@ -0,0 +1,49 @@
+From 982e47df7b82c5ffe3c414cf5641f08dba0f0e64 Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex.kanavin at gmail.com>
+Date: Fri, 26 Jan 2018 16:32:04 +0200
+Subject: [PATCH] Revert "Set FD_CLOEXEC on opened files before exec from lua
+ script is called"
+
+This reverts commit 7a7c31f551ff167f8718aea6d5048f6288d60205.
+The reason is that when _SC_OPEN_MAX is much higher than the usual 1024
+(for example inside docker), the performance drops sharply.
+
+Upstream has been notified:
+https://bugzilla.redhat.com/show_bug.cgi?id=1537564
+
+Upstream-Status: Inappropriate [upstream needs to come up with a better fix]
+Signed-off-by: Alexander Kanavin <alex.kanavin at gmail.com>
+---
+ luaext/lposix.c | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/luaext/lposix.c b/luaext/lposix.c
+index 0a7c26c71..c578c5a11 100644
+--- a/luaext/lposix.c
++++ b/luaext/lposix.c
+@@ -335,22 +335,10 @@ static int Pexec(lua_State *L) /** exec(path,[args]) */
+ const char *path = luaL_checkstring(L, 1);
+ int i,n=lua_gettop(L);
+ char **argv;
+- int flag, fdno, open_max;
+
+ if (!have_forked)
+ return luaL_error(L, "exec not permitted in this context");
+
+- open_max = sysconf(_SC_OPEN_MAX);
+- if (open_max == -1) {
+- open_max = 1024;
+- }
+- for (fdno = 3; fdno < open_max; fdno++) {
+- flag = fcntl(fdno, F_GETFD);
+- if (flag == -1 || (flag & FD_CLOEXEC))
+- continue;
+- fcntl(fdno, F_SETFD, FD_CLOEXEC);
+- }
+-
+ argv = malloc((n+1)*sizeof(char*));
+ if (argv==NULL) return luaL_error(L,"not enough memory");
+ argv[0] = (char*)path;
+--
+2.15.1
+
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.1.bb
index d759027..7b8ea46 100644
--- a/meta/recipes-devtools/rpm/rpm_4.14.1.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.14.1.bb
@@ -39,6 +39,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \
file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \
file://0001-perl-disable-auto-reqs.patch \
+ file://0001-Revert-Set-FD_CLOEXEC-on-opened-files-before-exec-fr.patch \
"
PE = "1"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list