diff options
author | Alexander Kanavin <alexander.kanavin@linux.intel.com> | 2018-02-01 20:01:53 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-02-06 11:06:29 +0000 |
commit | b7b552bd06989ea154614c84242f08d73eb3b9ba (patch) | |
tree | dc3d34274fb75ca833f2efeff2141989b9a25f48 /meta/recipes-devtools | |
parent | 4a6b872bd47d003009911f040724294561d45664 (diff) | |
download | poky-b7b552bd06989ea154614c84242f08d73eb3b9ba.tar.gz |
rpm: add a patch to help with Docker performance issues
(From OE-Core rev: 6f1822e5f1eaafd8bc46e999de730c1fcca77f3a)
Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/rpm/files/0001-Revert-Set-FD_CLOEXEC-on-opened-files-before-exec-fr.patch | 49 | ||||
-rw-r--r-- | meta/recipes-devtools/rpm/rpm_4.14.1.bb | 1 |
2 files changed, 50 insertions, 0 deletions
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 0000000000..4651409a65 --- /dev/null +++ b/meta/recipes-devtools/rpm/files/0001-Revert-Set-FD_CLOEXEC-on-opened-files-before-exec-fr.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | From 982e47df7b82c5ffe3c414cf5641f08dba0f0e64 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Fri, 26 Jan 2018 16:32:04 +0200 | ||
4 | Subject: [PATCH] Revert "Set FD_CLOEXEC on opened files before exec from lua | ||
5 | script is called" | ||
6 | |||
7 | This reverts commit 7a7c31f551ff167f8718aea6d5048f6288d60205. | ||
8 | The reason is that when _SC_OPEN_MAX is much higher than the usual 1024 | ||
9 | (for example inside docker), the performance drops sharply. | ||
10 | |||
11 | Upstream has been notified: | ||
12 | https://bugzilla.redhat.com/show_bug.cgi?id=1537564 | ||
13 | |||
14 | Upstream-Status: Inappropriate [upstream needs to come up with a better fix] | ||
15 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
16 | --- | ||
17 | luaext/lposix.c | 12 ------------ | ||
18 | 1 file changed, 12 deletions(-) | ||
19 | |||
20 | diff --git a/luaext/lposix.c b/luaext/lposix.c | ||
21 | index 0a7c26c71..c578c5a11 100644 | ||
22 | --- a/luaext/lposix.c | ||
23 | +++ b/luaext/lposix.c | ||
24 | @@ -335,22 +335,10 @@ static int Pexec(lua_State *L) /** exec(path,[args]) */ | ||
25 | const char *path = luaL_checkstring(L, 1); | ||
26 | int i,n=lua_gettop(L); | ||
27 | char **argv; | ||
28 | - int flag, fdno, open_max; | ||
29 | |||
30 | if (!have_forked) | ||
31 | return luaL_error(L, "exec not permitted in this context"); | ||
32 | |||
33 | - open_max = sysconf(_SC_OPEN_MAX); | ||
34 | - if (open_max == -1) { | ||
35 | - open_max = 1024; | ||
36 | - } | ||
37 | - for (fdno = 3; fdno < open_max; fdno++) { | ||
38 | - flag = fcntl(fdno, F_GETFD); | ||
39 | - if (flag == -1 || (flag & FD_CLOEXEC)) | ||
40 | - continue; | ||
41 | - fcntl(fdno, F_SETFD, FD_CLOEXEC); | ||
42 | - } | ||
43 | - | ||
44 | argv = malloc((n+1)*sizeof(char*)); | ||
45 | if (argv==NULL) return luaL_error(L,"not enough memory"); | ||
46 | argv[0] = (char*)path; | ||
47 | -- | ||
48 | 2.15.1 | ||
49 | |||
diff --git a/meta/recipes-devtools/rpm/rpm_4.14.1.bb b/meta/recipes-devtools/rpm/rpm_4.14.1.bb index d75902788e..7b8ea46a75 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 \ | |||
39 | file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \ | 39 | file://0003-rpmstrpool.c-make-operations-over-string-pools-threa.patch \ |
40 | file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \ | 40 | file://0004-build-pack.c-remove-static-local-variables-from-buil.patch \ |
41 | file://0001-perl-disable-auto-reqs.patch \ | 41 | file://0001-perl-disable-auto-reqs.patch \ |
42 | file://0001-Revert-Set-FD_CLOEXEC-on-opened-files-before-exec-fr.patch \ | ||
42 | " | 43 | " |
43 | 44 | ||
44 | PE = "1" | 45 | PE = "1" |