diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-12-17 04:11:34 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-01-09 02:21:44 +0300 |
commit | 1a4b7ee28bf7413af6513fb45ad0d0736048f866 (patch) | |
tree | 79f6d8ea698cab8f2eaf4f54b793d2ca7a1451ce /poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch | |
parent | 5b9ede0403237c7dace972affa65cf64a1aadd0e (diff) | |
download | openbmc-1a4b7ee28bf7413af6513fb45ad0d0736048f866.tar.xz |
reset upstream subtrees to yocto 2.6
Reset the following subtrees on thud HEAD:
poky: 87e3a9739d
meta-openembedded: 6094ae18c8
meta-security: 31dc4e7532
meta-raspberrypi: a48743dc36
meta-xilinx: c42016e2e6
Also re-apply backports that didn't make it into thud:
poky:
17726d0 systemd-systemctl-native: handle Install wildcards
meta-openembedded:
4321a5d libtinyxml2: update to 7.0.1
042f0a3 libcereal: Add native and nativesdk classes
e23284f libcereal: Allow empty package
030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG
179a1b9 gtest: update to 1.8.1
Squashed OpenBMC subtree compatibility updates:
meta-aspeed:
Brad Bishop (1):
aspeed: add yocto 2.6 compatibility
meta-ibm:
Brad Bishop (1):
ibm: prepare for yocto 2.6
meta-ingrasys:
Brad Bishop (1):
ingrasys: set layer compatibility to yocto 2.6
meta-openpower:
Brad Bishop (1):
openpower: set layer compatibility to yocto 2.6
meta-phosphor:
Brad Bishop (3):
phosphor: set layer compatibility to thud
phosphor: libgpg-error: drop patches
phosphor: react to fitimage artifact rename
Ed Tanous (4):
Dropbear: upgrade options for latest upgrade
yocto2.6: update openssl options
busybox: remove upstream watchdog patch
systemd: Rebase CONFIG_CGROUP_BPF patch
Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch')
-rw-r--r-- | poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch b/poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch deleted file mode 100644 index a27f8e623..000000000 --- a/poky/meta/recipes-devtools/rpm/files/0002-Optimize-rpmSetCloseOnExec.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 5e6f05cd8dad6c1ee6bd1e6e43f176976c9c3416 Mon Sep 17 00:00:00 2001 -From: Kir Kolyshkin <kolyshkin@gmail.com> -Date: Tue, 29 May 2018 17:52:56 -0700 -Subject: [PATCH 2/3] Optimize rpmSetCloseOnExec - -In case maximum number of open files limit is set too high, both -luaext/Pexec() and lib/doScriptExec() spend way too much time -trying to set FD_CLOEXEC flag for all those file descriptors, -resulting in severe increase of time it takes to execute say -rpm or dnf. - -This becomes increasingly noticeable when running with e.g. under -Docker, the reason being: - -> $ docker run fedora ulimit -n -> 1048576 - -One obvious fix is to use procfs to get the actual list of opened fds -and iterate over it. My quick-n-dirty benchmark shows the /proc approach -is about 10x faster than iterating through a list of just 1024 fds, -so it's an improvement even for default ulimit values. - -Note that the old method is still used in case /proc is not available. - -While at it, - - 1. fix the function by making sure we modify (rather than set) - the existing flags. As the only known flag is FD_CLOEXEC, - this change is currently purely aesthetical, but in case - other flags will appear it will become a real bug fix. - - 2. get rid of magic number 3; use STDERR_FILENO - -Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com> - -Fixes #444 - -Upstream-Status: Accepted [https://github.com/rpm-software-management/rpm/pull/444] -Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> ---- - rpmio/rpmio.c | 43 ++++++++++++++++++++++++++++++++++--------- - 1 file changed, 34 insertions(+), 9 deletions(-) - -diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c -index ea111d2ec..55351c221 100644 ---- a/rpmio/rpmio.c -+++ b/rpmio/rpmio.c -@@ -1760,18 +1760,43 @@ DIGEST_CTX fdDupDigest(FD_t fd, int id) - return ctx; - } - -+static void set_cloexec(int fd) -+{ -+ int flags = fcntl(fd, F_GETFD); -+ -+ if (flags == -1 || (flags & FD_CLOEXEC)) -+ return; -+ -+ fcntl(fd, F_SETFD, flags | FD_CLOEXEC); -+} -+ - void rpmSetCloseOnExec(void) - { -- int flag, fdno, open_max; -+ const int min_fd = STDERR_FILENO; /* don't touch stdin/out/err */ -+ int fd; -+ -+ DIR *dir = opendir("/proc/self/fd"); -+ if (dir == NULL) { /* /proc not available */ -+ /* iterate over all possible fds, might be slow */ -+ int open_max = sysconf(_SC_OPEN_MAX); -+ if (open_max == -1) -+ open_max = 1024; - -- open_max = sysconf(_SC_OPEN_MAX); -- if (open_max == -1) { -- open_max = 1024; -+ for (fd = min_fd + 1; fd < open_max; fd++) -+ set_cloexec(fd); -+ -+ return; - } -- 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); -+ -+ /* iterate over fds obtained from /proc */ -+ struct dirent *entry; -+ while ((entry = readdir(dir)) != NULL) { -+ fd = atoi(entry->d_name); -+ if (fd > min_fd) -+ set_cloexec(fd); - } -+ -+ closedir(dir); -+ -+ return; - } |