Date   

Re: [PATCH] runqueue: add cpu/io pressure regulation

Richard Purdie
 

On Wed, 2022-06-29 at 16:10 -0400, Aryaman Gupta wrote:
Stop the scheduler from starting new tasks if the
current cpu or io pressure is above a certain threshold, specified
through the "BB_MAX_{CPU|IO}_SOME_PRESSURE" variables in conf/local.conf.

If the thresholds aren't specified, the default values are 100 for both
CPU and IO, which will have no impact on build times.
Arbitary lower limit of 1.0 results in a fatal error to avoid extremely
long builds. If the percentage limits are higher than 100, then the default
values are used and warnings are issued to inform users that the
specified limit is out of bounds.

Signed-off-by: Aryaman Gupta <aryaman.gupta@...>
Signed-off-by: Randy Macleod <randy.macleod@...>
---
bitbake/lib/bb/runqueue.py | 39 ++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
This looks like a good start, thanks. There are a few things which will
need cleaning up in here as this is pretty performance sensitive code
(try a "time bitbake world -n" to see what I mean).

Firstly, it is a bitbake patch so should really go to the bitbake
mailing list, not OE-Core.

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 1e47fe70ef..9667acc11c 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -159,6 +159,27 @@ class RunQueueScheduler(object):
self.buildable.append(tid)

self.rev_prio_map = None
+ # Some hosts like openSUSE have readable /proc/pressure files
+ # but throw errors when these files are opened.
+ try:
+ subprocess.check_output(["cat", "/proc/pressure/cpu", "/proc/pressure/io"], \
+ universal_newlines=True, stderr=subprocess.DEVNULL)
+ self.readable_pressure_files = True

except:
+ if self.rq.max_cpu_pressure!=100 or self.rq.max_io_pressure!=100:
+ bb.warn("The /proc/pressure files can't be read. Continuing build without monitoring pressure")
+ self.readable_pressure_files = False
+
+ def exceeds_max_pressure(self):
+ if self.readable_pressure_files:
+ # extract avg10 from /proc/pressure/{cpu|io}
+ curr_pressure_sample = subprocess.check_output(["cat", "/proc/pressure/cpu", "/proc/pressure/io"], \
+ universal_newlines=True, stderr=subprocess.DEVNULL)
+ curr_cpu_pressure = curr_pressure_sample.split('\n')[0].split()[1].split("=")[1]
+ curr_io_pressure = curr_pressure_sample.split('\n')[2].split()[1].split("=")[1]
This is horrible, you're adding in a fork() call for every pass through
the scheduler code. You can just open() and read the file instead which
will have *much* lower overhead.

Even then, I'm not particularly thrilled to have this level of overhead
in this codepath, in some ways I'd prefer to rate limit how often we're
looking up this value rather than once per pass through the scheduler
path. I'm curious what the timings say.

+
+ return float(curr_cpu_pressure) > self.rq.max_cpu_pressure or float(curr_io_pressure) > self.rq.max_io_pressure
+ return False

def next_buildable_task(self):
"""
@@ -171,6 +192,8 @@ class RunQueueScheduler(object):
buildable.intersection_update(self.rq.tasks_covered | self.rq.tasks_notcovered)
if not buildable:
return None
+ if self.exceeds_max_pressure():
+ return None

# Filter out tasks that have a max number of threads that have been exceeded
skip_buildable = {}
@@ -1699,6 +1722,8 @@ class RunQueueExecute:

self.number_tasks = int(self.cfgData.getVar("BB_NUMBER_THREADS") or 1)
self.scheduler = self.cfgData.getVar("BB_SCHEDULER") or "speed"
+ self.max_cpu_pressure = float(self.cfgData.getVar("BB_MAX_CPU_SOME_PRESSURE") or 100.0)
+ self.max_io_pressure = float(self.cfgData.getVar("BB_MAX_IO_SOME_PRESSURE") or 100.0)
I did wonder if this should be BB_PRESSURE_MAX_SOME_IO as the order of
the information kinds of seems backwards to me. That could just be me
though! :)

Cheers,

Richard


Re: [PATCH] glibc-tests: not clear BBCLASSEXTEND

Kai Kang
 

On 6/29/22 6:23 AM, Randy MacLeod wrote:
On 2022-06-28 12:03, Richard Purdie wrote:
On Tue, 2022-06-28 at 23:22 +0800, kai wrote:
From: Kai Kang <kai.kang@...>

It clears BBCLASSEXTEND in glibc-tests recipe to remove 'nativesdk'
which is set in glibc recipe. The side effect is that it removes
"${MULTILIBS}" at same time if multilib enabled. Then there will no
multilib version glibc-tests. So only remove 'nativesdk' from
BBCLASSEXTEND rather than clear it.

Signed-off-by: Kai Kang <kai.kang@...>
---
  meta/recipes-core/glibc/glibc-tests_2.35.bb | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/glibc/glibc-tests_2.35.bb b/meta/recipes-core/glibc/glibc-tests_2.35.bb
index 414f8660de..028e83e865 100644
--- a/meta/recipes-core/glibc/glibc-tests_2.35.bb
+++ b/meta/recipes-core/glibc/glibc-tests_2.35.bb
@@ -18,7 +18,8 @@ python __anonymous() {
         d.setVar("PROVIDES", "${PN} ${PN}-ptest")
         d.setVar("RPROVIDES", "${PN} ${PN}-ptest")
  -       d.setVar("BBCLASSEXTEND", "")
+       bbclassextend = d.getVar("BBCLASSEXTEND").replace("nativesdk", "").strip()
+       d.setVar("BBCLASSEXTEND", bbclassextend)
         d.setVar("RRECOMMENDS", "")
         d.setVar("SYSTEMD_SERVICE:nscd", "")
         d.setVar("SYSTEMD_PACKAGES", "")
@@ -95,7 +96,7 @@ python populate_packages:prepend () {
          d.setVar('DEBIAN_NAMES', '')
  }
  -FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/glibc-tests/*"
+FILES:${PN} = "${PTEST_PATH}/* /usr/src/debug/${PN}/*"
    EXCLUDE_FROM_SHLIBS = "1"
Have you tested the multilib glibc-tests and been able to use it
successfully?

If Kai hasn't Naveen will.
Thanks. I test it on core-image-minimal with multilib enabled.

And 132 test cases of lib32-glibc-tests run, 121 PASS, 10 FAIL and 1 SKIP.

Regards,
Kai


../Randy


Cheers,

Richard


--
Kai Kang
Wind River Linux


Re: [PATCH] gstreamer1.0: upgrade 1.20.2 -> 1.20.3

Alexander Kanavin
 

I think we can also simply wait for AUH to process the full set
automatically (which will happen tomorrow), then you or anyone else
interested can simply pick the patches off this mailing list, or see
upfront where the problems are.

Alex

On Thu, 30 Jun 2022 at 10:38, wangmy <wangmy@...> wrote:

Thank you for reminding.

I will upgrade the framework as a whole and submit it again.



--

Best Regards

---------------------------------------------------

Wang Mingyu

Development Dept.I

Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China

TEL: +86+25-86630566-8568

COINS: 79988548

FAX: +86+25-83317685

MAIL: wangmy@...

http://www.fujitsu.com/cn/fnst/



From: openembedded-core@... <openembedded-core@...> On Behalf Of Jose Quaresma
Sent: Thursday, June 30, 2022 4:11 PM
To: Wang, Mingyu/王 鸣瑜 <wangmy@...>
Cc: OE-core <openembedded-core@...>
Subject: Re: [OE-core] [PATCH] gstreamer1.0: upgrade 1.20.2 -> 1.20.3



Hi wangmy,



This doesn't work, gstreamer is a framework so when you update one element you need to update all of them.



Jose



wangmy <wangmy@...> escreveu no dia quinta, 30/06/2022 à(s) 05:20:

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../{gstreamer1.0_1.20.2.bb => gstreamer1.0_1.20.3.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0_1.20.2.bb => gstreamer1.0_1.20.3.bb} (97%)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
similarity index 97%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
index 3aa9aa7048..1f4576c3e1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
@@ -23,7 +23,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.x
file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \
file://0005-tests-remove-gstbin-test_watch_for_state_change-test.patch \
"
-SRC_URI[sha256sum] = "df24e8792691a02dfe003b3833a51f1dbc6c3331ae625d143b17da939ceb5e0a"
+SRC_URI[sha256sum] = "607daf64bbbd5fb18af9d17e21c0d22c4d702fffe83b23cb22d1b1af2ca23a2a"

PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
check \
--
2.25.1






--

Best regards,


José Quaresma




Re: [PATCH] package_manager/ipk: do not pipe stderr to stdout

Alexander Kanavin
 

Thanks for the information - perhaps this should be added to the commit message?

Does this change discard things that appear on stderr completely, or
does it still go somewhere where it can be seen later?

Alex

On Wed, 29 Jun 2022 at 21:22, Shruthi Ravichandran
<shruthi.ravichandran@...> wrote:

Hi Alex,

I've found that some OE commands print an error during cleanup when
the tmp_dir does not exist and an attempt is made to delete it. I've
submitted a patch to opkg to fix that.
Link: https://git.yoctoproject.org/opkg/commit/?id=8dfdda86afd407a66e3dc00a077bdcc8b53d54ea.
That was the one instance that was causing an issue in our builds.
There may be other instances that I don't know of. Given that, I think
the package_manager code should be resilient against any such
miscellaneous stderr messages, which do not result in the command
itself failing.

Hope that helps,
Shruthi

-----Original Message-----
From: Alexander Kanavin <alex.kanavin@...>
Sent: Tuesday, June 28, 2022 1:33 PM
To: Shruthi Ravichandran <shruthi.ravichandran@...>
Cc: openembedded-core@...
Subject: Re: [OE-core][PATCH] package_manager/ipk: do not pipe stderr to stdout

This needs additional justification. What are the error messages, why are they harmless and why the solution is to suppress them instead of
addressing the reasons they appear?

Alex

On Tue 28. Jun 2022 at 23.13, Shruthi Ravichandran <shruthi.ravichandran@... <mailto:shruthi.ravichandran@...> > wrote:


When parsing the output of a command, do not pipe stderr to stdout.
Opkg sometimes prints harmless error messages even when the opkg
command succeeds. When stderr is piped to stdout, these error
messages may clobber the stdout and cause unexpected results while
parsing the output.

Signed-off-by: Shruthi Ravichandran <shruthi.ravichandran@... <mailto:shruthi.ravichandran@...> >
---
meta/lib/oe/package_manager/ipk/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oe/package_manager/ipk/__init__.py b/meta/lib/oe/package_manager/ipk/__init__.py
index 4cd3963111..d7f3f31853 100644
--- a/meta/lib/oe/package_manager/ipk/__init__.py
+++ b/meta/lib/oe/package_manager/ipk/__init__.py
@@ -103,7 +103,7 @@ class OpkgDpkgPM(PackageManager):
"""

try:
- output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True).decode("utf-8")
+ output = subprocess.check_output(cmd, shell=True).decode("utf-8")
except subprocess.CalledProcessError as e:
bb.fatal("Unable to list available packages. Command '%s' "
"returned %d:\n%s" % (cmd, e.returncode, e.output.decode("utf-8")))
--
2.20.1





INTERNAL - NI CONFIDENTIAL


Re: [PATCH] gstreamer1.0: upgrade 1.20.2 -> 1.20.3

wangmy
 

Thank you for reminding.

I will upgrade the framework as a whole and submit it again.

 

  --

Best Regards

---------------------------------------------------

Wang Mingyu

Development Dept.I

Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) No. 6 Wenzhu Road, Nanjing, 210012, China

TEL: +86+25-86630566-8568

COINS: 79988548

FAX: +86+25-83317685

MAIL: wangmy@...

http://www.fujitsu.com/cn/fnst/

 

From: openembedded-core@... <openembedded-core@...> On Behalf Of Jose Quaresma
Sent: Thursday, June 30, 2022 4:11 PM
To: Wang, Mingyu/
鸣瑜 <wangmy@...>
Cc: OE-core <openembedded-core@...>
Subject: Re: [OE-core] [PATCH] gstreamer1.0: upgrade 1.20.2 -> 1.20.3

 

Hi wangmy,

 

This doesn't work, gstreamer is a framework so when you update one element you need to update all of them.

 

Jose

 

wangmy <wangmy@...> escreveu no dia quinta, 30/06/2022 à(s) 05:20:

Signed-off-by: Wang Mingyu <wangmy@...>
---
 .../{gstreamer1.0_1.20.2.bb => gstreamer1.0_1.20.3.bb}          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0_1.20.2.bb => gstreamer1.0_1.20.3.bb} (97%)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
similarity index 97%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
index 3aa9aa7048..1f4576c3e1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
@@ -23,7 +23,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.x
            file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \
            file://0005-tests-remove-gstbin-test_watch_for_state_change-test.patch \
            "
-SRC_URI[sha256sum] = "df24e8792691a02dfe003b3833a51f1dbc6c3331ae625d143b17da939ceb5e0a"
+SRC_URI[sha256sum] = "607daf64bbbd5fb18af9d17e21c0d22c4d702fffe83b23cb22d1b1af2ca23a2a"

 PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
                    check \
--
2.25.1




 

--

Best regards,


José Quaresma


Re: [PATCH] runqueue: add cpu/io pressure regulation

Jose Quaresma
 

Hi Aryaman,

Aryaman Gupta <aryaman.gupta@...> escreveu no dia quarta, 29/06/2022 à(s) 21:10:
Stop the scheduler from starting new tasks if the
current cpu or io pressure is above a certain threshold, specified
through the "BB_MAX_{CPU|IO}_SOME_PRESSURE" variables in conf/local.conf.

If the thresholds aren't specified, the default values are 100 for both
CPU and IO, which will have no impact on build times.
Arbitary lower limit of 1.0 results in a fatal error to avoid extremely
long builds. If the percentage limits are higher than 100, then the default
values are used and warnings are issued to inform users that the
specified limit is out of bounds.

Signed-off-by: Aryaman Gupta <aryaman.gupta@...>
Signed-off-by: Randy Macleod <randy.macleod@...>
---
 bitbake/lib/bb/runqueue.py | 39 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 1e47fe70ef..9667acc11c 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -159,6 +159,27 @@ class RunQueueScheduler(object):
                 self.buildable.append(tid)

         self.rev_prio_map = None
+        # Some hosts like openSUSE have readable /proc/pressure files
+        # but throw errors when these files are opened.
+        try:
+            subprocess.check_output(["cat", "/proc/pressure/cpu", "/proc/pressure/io"], \
+                                    universal_newlines=True, stderr=subprocess.DEVNULL)
+            self.readable_pressure_files = True
+        except:
+            if self.rq.max_cpu_pressure!=100 or self.rq.max_io_pressure!=100:
+                bb.warn("The /proc/pressure files can't be read. Continuing build without monitoring pressure")
+            self.readable_pressure_files = False
+
+    def exceeds_max_pressure(self):
+        if self.readable_pressure_files:

We can jump when the user does not provide any default values or if they provide the maximum

if self.readable_pressure_files and (self.rq.max_cpu_pressure < 100 or self.rq.max_io_pressure < 100):

Jose

+            # extract avg10 from /proc/pressure/{cpu|io}
+            curr_pressure_sample = subprocess.check_output(["cat", "/proc/pressure/cpu", "/proc/pressure/io"], \
+                                   universal_newlines=True, stderr=subprocess.DEVNULL)
+            curr_cpu_pressure = curr_pressure_sample.split('\n')[0].split()[1].split("=")[1]
+            curr_io_pressure = curr_pressure_sample.split('\n')[2].split()[1].split("=")[1]
+
+            return float(curr_cpu_pressure) > self.rq.max_cpu_pressure or float(curr_io_pressure) > self.rq.max_io_pressure
+        return False

     def next_buildable_task(self):
         """
@@ -171,6 +192,8 @@ class RunQueueScheduler(object):
         buildable.intersection_update(self.rq.tasks_covered | self.rq.tasks_notcovered)
         if not buildable:
             return None
+        if self.exceeds_max_pressure():
+            return None

         # Filter out tasks that have a max number of threads that have been exceeded
         skip_buildable = {}
@@ -1699,6 +1722,8 @@ class RunQueueExecute:

         self.number_tasks = int(self.cfgData.getVar("BB_NUMBER_THREADS") or 1)
         self.scheduler = self.cfgData.getVar("BB_SCHEDULER") or "speed"
+        self.max_cpu_pressure = float(self.cfgData.getVar("BB_MAX_CPU_SOME_PRESSURE") or 100.0)
+        self.max_io_pressure = float(self.cfgData.getVar("BB_MAX_IO_SOME_PRESSURE") or 100.0)

         self.sq_buildable = set()
         self.sq_running = set()
@@ -1733,6 +1758,20 @@ class RunQueueExecute:
         if self.number_tasks <= 0:
              bb.fatal("Invalid BB_NUMBER_THREADS %s" % self.number_tasks)

+        lower_limit = 1.0
+        upper_limit = 100.0
+        if self.max_cpu_pressure < lower_limit:
+            bb.fatal("Invalid BB_MAX_CPU_SOME_PRESSURE %s, minimum value is %s" % (self.max_cpu_pressure, lower_limit))
+        if self.max_cpu_pressure > upper_limit:
+            bb.warn("Percentage value of BB_MAX_CPU_SOME_PRESSURE %s rounded down to %s" % (self.max_cpu_pressure, upper_limit))
+            self.max_cpu_pressure = upper_limit
+
+        if self.max_io_pressure < lower_limit:
+            bb.fatal("Invalid BB_MAX_IO_SOME_PRESSURE %s, minimum value is %s" % (self.max_io_pressure, lower_limit))
+        if self.max_io_pressure > upper_limit:
+            bb.warn("Percentage value of BB_MAX_IO_SOME_PRESSURE %s rounded down to %s" % (self.max_io_pressure, upper_limit))
+            self.max_io_pressure = upper_limit
+
         # List of setscene tasks which we've covered
         self.scenequeue_covered = set()
         # List of tasks which are covered (including setscene ones)
--
2.35.1






--
Best regards,

José Quaresma


[PATCH] oe-selftest-image: Ensure the image has sftp as well as dropbear

Richard Purdie
 

We need sftp so that scp works with recent openssh. Use the packagegroup
instead of a direct dependency to ensure this.

Signed-off-by: Richard Purdie <richard.purdie@...>
---
meta-selftest/recipes-test/images/oe-selftest-image.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-selftest/recipes-test/images/oe-selftest-image.bb b/meta-selftest/recipes-test/images/oe-selftest-image.bb
index e295943ae5a..317a0712aaf 100644
--- a/meta-selftest/recipes-test/images/oe-selftest-image.bb
+++ b/meta-selftest/recipes-test/images/oe-selftest-image.bb
@@ -1,7 +1,7 @@
SUMMARY = "An image used during oe-selftest tests"

# libudev is needed for deploy mdadm via devtool
-IMAGE_INSTALL = "packagegroup-core-boot dropbear libudev"
+IMAGE_INSTALL = "packagegroup-core-boot packagegroup-core-ssh-dropbear libudev"
IMAGE_FEATURES = "debug-tweaks"

IMAGE_LINGUAS = " "
--
2.34.1


Re: [PATCH] gstreamer1.0: upgrade 1.20.2 -> 1.20.3

Jose Quaresma
 

Hi wangmy,

This doesn't work, gstreamer is a framework so when you update one element you need to update all of them.

Jose

wangmy <wangmy@...> escreveu no dia quinta, 30/06/2022 à(s) 05:20:

Signed-off-by: Wang Mingyu <wangmy@...>
---
 .../{gstreamer1.0_1.20.2.bb => gstreamer1.0_1.20.3.bb}          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-multimedia/gstreamer/{gstreamer1.0_1.20.2.bb => gstreamer1.0_1.20.3.bb} (97%)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
similarity index 97%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
index 3aa9aa7048..1f4576c3e1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
@@ -23,7 +23,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.x
            file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \
            file://0005-tests-remove-gstbin-test_watch_for_state_change-test.patch \
            "
-SRC_URI[sha256sum] = "df24e8792691a02dfe003b3833a51f1dbc6c3331ae625d143b17da939ceb5e0a"
+SRC_URI[sha256sum] = "607daf64bbbd5fb18af9d17e21c0d22c4d702fffe83b23cb22d1b1af2ca23a2a"

 PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
                    check \
--
2.25.1






--
Best regards,

José Quaresma


[PATCH] sudo: upgrade 1.9.11p2 -> 1.9.11p3

wangmy
 

Changelog:
==========
- Fixed "connection reset" errors on AIX when running shell scripts with the
intercept or log_subcmds sudoers options enabled. Bug #1034.
- Fixed very slow execution of shell scripts when the intercept or log_subcmds
sudoers options are set on systems that enable Nagle's algorithm on the
loopback device, such as AIX. Bug #1034.

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../sudo/{sudo_1.9.11p2.bb => sudo_1.9.11p3.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-extended/sudo/{sudo_1.9.11p2.bb => sudo_1.9.11p3.bb} (96%)

diff --git a/meta/recipes-extended/sudo/sudo_1.9.11p2.bb b/meta/recipes-extended/sudo/sudo_1.9.11p3.bb
similarity index 96%
rename from meta/recipes-extended/sudo/sudo_1.9.11p2.bb
rename to meta/recipes-extended/sudo/sudo_1.9.11p3.bb
index b3eae4a0fa..ba610ee2e7 100644
--- a/meta/recipes-extended/sudo/sudo_1.9.11p2.bb
+++ b/meta/recipes-extended/sudo/sudo_1.9.11p3.bb
@@ -8,7 +8,7 @@ SRC_URI = "https://www.sudo.ws/dist/sudo-${PV}.tar.gz \

PAM_SRC_URI = "file://sudo.pam"

-SRC_URI[sha256sum] = "a21918eb9fc0063794f6887464fa2d924ab6d192e19063191a429605c22791d2"
+SRC_URI[sha256sum] = "4687e7d2f56721708f59cca2e1352c056cb23de526c22725615a42bb094f1f70"

DEPENDS += " virtual/crypt ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
RDEPENDS:${PN} += " ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-limits pam-plugin-keyinit', '', d)}"
--
2.25.1


[PATCH] sqlite3: upgrade 3.38.5 -> 3.39.0

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../sqlite/{sqlite3_3.38.5.bb => sqlite3_3.39.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-support/sqlite/{sqlite3_3.38.5.bb => sqlite3_3.39.0.bb} (86%)

diff --git a/meta/recipes-support/sqlite/sqlite3_3.38.5.bb b/meta/recipes-support/sqlite/sqlite3_3.39.0.bb
similarity index 86%
rename from meta/recipes-support/sqlite/sqlite3_3.38.5.bb
rename to meta/recipes-support/sqlite/sqlite3_3.39.0.bb
index d56a3a0209..a44a752893 100644
--- a/meta/recipes-support/sqlite/sqlite3_3.38.5.bb
+++ b/meta/recipes-support/sqlite/sqlite3_3.39.0.bb
@@ -4,7 +4,7 @@ LICENSE = "PD"
LIC_FILES_CHKSUM = "file://sqlite3.h;endline=11;md5=786d3dc581eff03f4fd9e4a77ed00c66"

SRC_URI = "http://www.sqlite.org/2022/sqlite-autoconf-${SQLITE_PV}.tar.gz"
-SRC_URI[sha256sum] = "5af07de982ba658fd91a03170c945f99c971f6955bc79df3266544373e39869c"
+SRC_URI[sha256sum] = "e90bcaef6dd5813fcdee4e867f6b65f3c9bfd0aec0f1017f9f3bbce1e4ed09e2"

# -19242 is only an issue in specific development branch commits
CVE_CHECK_IGNORE += "CVE-2019-19242"
--
2.25.1


[PATCH] repo: upgrade 2.26 -> 2.27

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
meta/recipes-devtools/repo/{repo_2.26.bb => repo_2.27.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/repo/{repo_2.26.bb => repo_2.27.bb} (95%)

diff --git a/meta/recipes-devtools/repo/repo_2.26.bb b/meta/recipes-devtools/repo/repo_2.27.bb
similarity index 95%
rename from meta/recipes-devtools/repo/repo_2.26.bb
rename to meta/recipes-devtools/repo/repo_2.27.bb
index ff5b7eb6aa..3c1e3acd7c 100644
--- a/meta/recipes-devtools/repo/repo_2.26.bb
+++ b/meta/recipes-devtools/repo/repo_2.27.bb
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
SRC_URI = "git://gerrit.googlesource.com/git-repo.git;protocol=https;branch=main \
file://0001-python3-shebang.patch \
"
-SRCREV = "bdcba7dc36f1c8e6041681eb5b3b5229c93c7c5c"
+SRCREV = "68d69635c7bfef6ed8a5c7e29246265611471e0f"

MIRRORS += "git://gerrit.googlesource.com/git-repo.git git://github.com/GerritCodeReview/git-repo.git"

--
2.25.1


[PATCH] speex: upgrade 1.2.0 -> 1.2.1

wangmy
 

CVE-2020-23903.patch
removed since it's included in 1.2.1

License-Update:
Add "Organisation (CSIRO)" to Copyright 2005-2008

Changelog:
===========
Check for _WIN32 instead of WIN32 in preprocessor checks
wav_io: check for EOF when seeking in wav (fixes hang discovered by fuzzing, see #9)
CI: add gitlab CI integration
fixed-point: make left shift macros use unsigned to avoid undefined behaviour
math_approx: use unsigned int for LCG pseudorandom generator (avoids integer overflow)
oss-fuzz: add integration and fuzzing target
speexenc: guard against invalid channel numbers (see #13)
speexdec: make left shift macros use unsigned to avoid undefined behaviour
autotools: do not use deprecated macros

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../speex/speex/CVE-2020-23903.patch | 30 -------------------
.../speex/{speex_1.2.0.bb => speex_1.2.1.bb} | 12 ++++----
2 files changed, 5 insertions(+), 37 deletions(-)
delete mode 100644 meta/recipes-multimedia/speex/speex/CVE-2020-23903.patch
rename meta/recipes-multimedia/speex/{speex_1.2.0.bb => speex_1.2.1.bb} (65%)

diff --git a/meta/recipes-multimedia/speex/speex/CVE-2020-23903.patch b/meta/recipes-multimedia/speex/speex/CVE-2020-23903.patch
deleted file mode 100644
index eb16e95ffc..0000000000
--- a/meta/recipes-multimedia/speex/speex/CVE-2020-23903.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Backport patch to fix CVE-2020-23903.
-
-CVE: CVE-2020-23903
-Upstream-Status: Backport [https://github.com/xiph/speex/commit/870ff84]
-
-Signed-off-by: Kai Kang <kai.kang@...>
-
-From 870ff845b32f314aec0036641ffe18aba4916887 Mon Sep 17 00:00:00 2001
-From: Tristan Matthews <tmatth@...>
-Date: Mon, 13 Jul 2020 23:25:03 -0400
-Subject: [PATCH] wav_io: guard against invalid channel numbers
-
-Fixes #13
----
- src/wav_io.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/wav_io.c b/src/wav_io.c
-index b5183015..09d62eb0 100644
---- a/src/wav_io.c
-+++ b/src/wav_io.c
-@@ -111,7 +111,7 @@ int read_wav_header(FILE *file, int *rate, int *channels, int *format, spx_int32
- stmp = le_short(stmp);
- *channels = stmp;
-
-- if (stmp>2)
-+ if (stmp>2 || stmp<1)
- {
- fprintf (stderr, "Only mono and (intensity) stereo supported\n");
- return -1;
diff --git a/meta/recipes-multimedia/speex/speex_1.2.0.bb b/meta/recipes-multimedia/speex/speex_1.2.1.bb
similarity index 65%
rename from meta/recipes-multimedia/speex/speex_1.2.0.bb
rename to meta/recipes-multimedia/speex/speex_1.2.1.bb
index ea475f0f1b..c40198fa8f 100644
--- a/meta/recipes-multimedia/speex/speex_1.2.0.bb
+++ b/meta/recipes-multimedia/speex/speex_1.2.1.bb
@@ -3,17 +3,15 @@ DESCRIPTION = "Speex is an Open Source/Free Software patent-free audio compressi
HOMEPAGE = "http://www.speex.org"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8 \
- file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eff3f76350f52a99a3df5eec6b79c02a \
+ file://include/speex/speex.h;beginline=1;endline=34;md5=ef8c8ea4f7198d71cf3509c6ed05ea50 \
+ "
DEPENDS = "libogg speexdsp"

-SRC_URI = "http://downloads.xiph.org/releases/speex/speex-${PV}.tar.gz \
- file://CVE-2020-23903.patch \
- "
+SRC_URI = "http://downloads.xiph.org/releases/speex/speex-${PV}.tar.gz"
UPSTREAM_CHECK_REGEX = "speex-(?P<pver>\d+(\.\d+)+)\.tar"

-SRC_URI[md5sum] = "8ab7bb2589110dfaf0ed7fa7757dc49c"
-SRC_URI[sha256sum] = "eaae8af0ac742dc7d542c9439ac72f1f385ce838392dc849cae4536af9210094"
+SRC_URI[sha256sum] = "4b44d4f2b38a370a2d98a78329fefc56a0cf93d1c1be70029217baae6628feea"

inherit autotools pkgconfig lib_package

--
2.25.1


[PATCH] speexdsp: upgrade 1.2.0 -> 1.2.1

wangmy
 

License-Update:
Add "Organisation (CSIRO)" to Copyright 2005-2008

Changelog:
=========
CI: add gitlab CI integration
fixed-point: Remove unused MULT16_32_Q1[1-4] macros and inlines
fixed-point: don't truncate 32-bit arg to MULT16_32_Q15
fixed-point resample: remove 1-bit shift right before interpolation
fixed-point: introduce MULT16_32_32 to handle unexpected types in MULT16_32_Q15
Fix incorrect macro names in arch.h
Remove unused stack_alloc.h
autotools: do not use deprecated macros

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../speex/{speexdsp_1.2.0.bb => speexdsp_1.2.1.bb} | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
rename meta/recipes-multimedia/speex/{speexdsp_1.2.0.bb => speexdsp_1.2.1.bb} (80%)

diff --git a/meta/recipes-multimedia/speex/speexdsp_1.2.0.bb b/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb
similarity index 80%
rename from meta/recipes-multimedia/speex/speexdsp_1.2.0.bb
rename to meta/recipes-multimedia/speex/speexdsp_1.2.1.bb
index bb7bc9aade..1e6d09ab92 100644
--- a/meta/recipes-multimedia/speex/speexdsp_1.2.0.bb
+++ b/meta/recipes-multimedia/speex/speexdsp_1.2.1.bb
@@ -3,14 +3,13 @@ DESCRIPTION = "SpeexDSP is a patent-free, Open Source/Free Software DSP library.
HOMEPAGE = "http://www.speex.org"
SECTION = "libs"
LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://COPYING;md5=314649d8ba9dd7045dfb6683f298d0a8"
+LIC_FILES_CHKSUM = "file://COPYING;md5=eff3f76350f52a99a3df5eec6b79c02a"

SRC_URI = "http://downloads.xiph.org/releases/speex/speexdsp-${PV}.tar.gz"

UPSTREAM_CHECK_REGEX = "speexdsp-(?P<pver>\d+(\.\d+)+)\.tar"

-SRC_URI[md5sum] = "b722df341576dc185d897131321008fc"
-SRC_URI[sha256sum] = "682042fc6f9bee6294ec453f470dadc26c6ff29b9c9e9ad2ffc1f4312fd64771"
+SRC_URI[sha256sum] = "8c777343e4a6399569c72abc38a95b24db56882c83dbdb6c6424a5f4aeb54d3d"

inherit autotools pkgconfig

--
2.25.1


[PATCH] harfbuzz: upgrade 4.3.0 -> 4.4.0

wangmy
 

Changelog:
==========
- Caching of variable fonts shaping, in particular when using HarfBuzz’s own
font loading functions (ot). Bringing performance of variable shaping in par
with non-variable fonts shaping.
- Caching of format 2 “Contextual Substitution” and “Chained Contexts
Substitution” lookups. Resulting in up to 20% speedup of lookup-heavy fonts
like Gulzar or Noto Nastaliq Urdu.
- Improved ANSI output from hb-view.
- Support for shaping legacy, pre-OpenType, Windows 3.1-era, Arabic fonts
that relied on a fixed PUA encoding.
- Sinhala script is now shaped by the USE shaper instead of “indic” one.
- Thai shaper improvements.
- hb-ot-name API supports approximate BCP-47 language matching, for example
asking for “en_US” in a font that has only “en” names will return them.
- Optimized TrueType glyph shape loading.
- Fix subsetting of HarfBuzz faces created via hb_face_create_for_tables().
- Add 32 bit var store support to the subsetter.
- New API
+HB_BUFFER_FLAG_DEFINED
+HB_BUFFER_SERIALIZE_FLAG_DEFINED
+hb_font_changed()
+hb_font_get_serial()
+hb_ft_hb_font_changed()
+hb_set_hash()
+hb_map_copy()
+hb_map_hash()

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../harfbuzz/{harfbuzz_4.3.0.bb => harfbuzz_4.4.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-graphics/harfbuzz/{harfbuzz_4.3.0.bb => harfbuzz_4.4.0.bb} (95%)

diff --git a/meta/recipes-graphics/harfbuzz/harfbuzz_4.3.0.bb b/meta/recipes-graphics/harfbuzz/harfbuzz_4.4.0.bb
similarity index 95%
rename from meta/recipes-graphics/harfbuzz/harfbuzz_4.3.0.bb
rename to meta/recipes-graphics/harfbuzz/harfbuzz_4.4.0.bb
index 909b8c57d9..007e278464 100644
--- a/meta/recipes-graphics/harfbuzz/harfbuzz_4.3.0.bb
+++ b/meta/recipes-graphics/harfbuzz/harfbuzz_4.4.0.bb
@@ -12,7 +12,7 @@ UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/releases"
UPSTREAM_CHECK_REGEX = "harfbuzz-(?P<pver>\d+(\.\d+)+).tar"

SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BPN}-${PV}.tar.xz"
-SRC_URI[sha256sum] = "a49628f4c4c8e6d8df95ef44935a93446cf2e46366915b0e3ca30df21fffb530"
+SRC_URI[sha256sum] = "02035eddb9d84112834abd1654ce0e177d14f41fd8ce0c29d5b4376888890790"

inherit meson pkgconfig lib_package gtk-doc gobject-introspection

--
2.25.1


[PATCH] gstreamer1.0: upgrade 1.20.2 -> 1.20.3

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../{gstreamer1.0_1.20.2.bb => gstreamer1.0_1.20.3.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-multimedia/gstreamer/{gstreamer1.0_1.20.2.bb => gstreamer1.0_1.20.3.bb} (97%)

diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
similarity index 97%
rename from meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb
rename to meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
index 3aa9aa7048..1f4576c3e1 100644
--- a/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.2.bb
+++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0_1.20.3.bb
@@ -23,7 +23,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gstreamer/gstreamer-${PV}.tar.x
file://0004-tests-add-helper-script-to-run-the-installed_tests.patch;striplevel=3 \
file://0005-tests-remove-gstbin-test_watch_for_state_change-test.patch \
"
-SRC_URI[sha256sum] = "df24e8792691a02dfe003b3833a51f1dbc6c3331ae625d143b17da939ceb5e0a"
+SRC_URI[sha256sum] = "607daf64bbbd5fb18af9d17e21c0d22c4d702fffe83b23cb22d1b1af2ca23a2a"

PACKAGECONFIG ??= "${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)} \
check \
--
2.25.1


[PATCH] git: upgrade 2.36.1 -> 2.37.0

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
meta/recipes-devtools/git/{git_2.36.1.bb => git_2.37.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/git/{git_2.36.1.bb => git_2.37.0.bb} (98%)

diff --git a/meta/recipes-devtools/git/git_2.36.1.bb b/meta/recipes-devtools/git/git_2.37.0.bb
similarity index 98%
rename from meta/recipes-devtools/git/git_2.36.1.bb
rename to meta/recipes-devtools/git/git_2.37.0.bb
index 07e416282b..d3bd0619af 100644
--- a/meta/recipes-devtools/git/git_2.36.1.bb
+++ b/meta/recipes-devtools/git/git_2.37.0.bb
@@ -165,4 +165,4 @@ EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no \
"
EXTRA_OEMAKE += "NO_GETTEXT=1"

-SRC_URI[tarball.sha256sum] = "37d936fd17c81aa9ddd3dba4e56e88a45fa534ad0ba946454e8ce818760c6a2c"
+SRC_URI[tarball.sha256sum] = "fc3ffe6c65c1f7c681a1ce6bb91703866e432c762731d4b57c566d696f6d62c3"
--
2.25.1


[PATCH] dmidecode: upgrade 3.3 -> 3.4

wangmy
 

Changelog:
==========
- Support for SMBIOS 3.4.0. This includes new memory device types, new
processor upgrades, new slot types and characteristics, decoding of memory
module extended speed, new system slot types, new processor characteristics
and new format of Processor ID.
- Support for SMBIOS 3.5.0. This includes new processor upgrades, BIOS
characteristics, new slot characteristics, new on-board device types, new
pointing device interface types, and a new record type (type 45 -
Firmware Inventory Information).
- Decode HPE OEM records 194, 199, 203, 236, 237, 238 ans 240.
- Bug fixes:
Fix OEM vendor name matching
Fix ASCII filtering of strings
Fix crash with option -u
- Minor improvements:
Skip details of uninstalled memory modules
Don't display the raw CPU ID in quiet mode
Improve the formatting of the manual pages

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../dmidecode/{dmidecode_3.3.bb => dmidecode_3.4.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/dmidecode/{dmidecode_3.3.bb => dmidecode_3.4.bb} (90%)

diff --git a/meta/recipes-devtools/dmidecode/dmidecode_3.3.bb b/meta/recipes-devtools/dmidecode/dmidecode_3.4.bb
similarity index 90%
rename from meta/recipes-devtools/dmidecode/dmidecode_3.3.bb
rename to meta/recipes-devtools/dmidecode/dmidecode_3.4.bb
index 23540b2703..bc741046dd 100644
--- a/meta/recipes-devtools/dmidecode/dmidecode_3.3.bb
+++ b/meta/recipes-devtools/dmidecode/dmidecode_3.4.bb
@@ -20,5 +20,5 @@ do_install() {
oe_runmake DESTDIR="${D}" install
}

-SRC_URI[sha256sum] = "82c737a780614c38a783e8055340d295e332fb12c7f418b5d21a0797d3fb1455"
+SRC_URI[sha256sum] = "43cba851d8467c9979ccdbeab192eb6638c7d3a697eba5ddb779da8837542212"

--
2.25.1


[PATCH] createrepo-c: upgrade 0.20.0 -> 0.20.1

wangmy
 

Signed-off-by: Wang Mingyu <wangmy@...>
---
.../{createrepo-c_0.20.0.bb => createrepo-c_0.20.1.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-devtools/createrepo-c/{createrepo-c_0.20.0.bb => createrepo-c_0.20.1.bb} (96%)

diff --git a/meta/recipes-devtools/createrepo-c/createrepo-c_0.20.0.bb b/meta/recipes-devtools/createrepo-c/createrepo-c_0.20.1.bb
similarity index 96%
rename from meta/recipes-devtools/createrepo-c/createrepo-c_0.20.0.bb
rename to meta/recipes-devtools/createrepo-c/createrepo-c_0.20.1.bb
index bc61cac955..d309bb895f 100644
--- a/meta/recipes-devtools/createrepo-c/createrepo-c_0.20.0.bb
+++ b/meta/recipes-devtools/createrepo-c/createrepo-c_0.20.1.bb
@@ -8,7 +8,7 @@ SRC_URI = "git://github.com/rpm-software-management/createrepo_c;branch=master;p
file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \
"

-SRCREV = "e53188f86f4dfad46f5b81d6931cbaec19e44ea2"
+SRCREV = "af14e164a3e4ab9dfaef1212e852b9ecebc326a2"

S = "${WORKDIR}/git"

--
2.25.1


[PATCH] runqueue: add cpu/io pressure regulation

Aryaman Gupta
 

Stop the scheduler from starting new tasks if the
current cpu or io pressure is above a certain threshold, specified
through the "BB_MAX_{CPU|IO}_SOME_PRESSURE" variables in conf/local.conf.

If the thresholds aren't specified, the default values are 100 for both
CPU and IO, which will have no impact on build times.
Arbitary lower limit of 1.0 results in a fatal error to avoid extremely
long builds. If the percentage limits are higher than 100, then the default
values are used and warnings are issued to inform users that the
specified limit is out of bounds.

Signed-off-by: Aryaman Gupta <aryaman.gupta@...>
Signed-off-by: Randy Macleod <randy.macleod@...>
---
bitbake/lib/bb/runqueue.py | 39 ++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

diff --git a/bitbake/lib/bb/runqueue.py b/bitbake/lib/bb/runqueue.py
index 1e47fe70ef..9667acc11c 100644
--- a/bitbake/lib/bb/runqueue.py
+++ b/bitbake/lib/bb/runqueue.py
@@ -159,6 +159,27 @@ class RunQueueScheduler(object):
self.buildable.append(tid)

self.rev_prio_map = None
+ # Some hosts like openSUSE have readable /proc/pressure files
+ # but throw errors when these files are opened.
+ try:
+ subprocess.check_output(["cat", "/proc/pressure/cpu", "/proc/pressure/io"], \
+ universal_newlines=True, stderr=subprocess.DEVNULL)
+ self.readable_pressure_files = True
+ except:
+ if self.rq.max_cpu_pressure!=100 or self.rq.max_io_pressure!=100:
+ bb.warn("The /proc/pressure files can't be read. Continuing build without monitoring pressure")
+ self.readable_pressure_files = False
+
+ def exceeds_max_pressure(self):
+ if self.readable_pressure_files:
+ # extract avg10 from /proc/pressure/{cpu|io}
+ curr_pressure_sample = subprocess.check_output(["cat", "/proc/pressure/cpu", "/proc/pressure/io"], \
+ universal_newlines=True, stderr=subprocess.DEVNULL)
+ curr_cpu_pressure = curr_pressure_sample.split('\n')[0].split()[1].split("=")[1]
+ curr_io_pressure = curr_pressure_sample.split('\n')[2].split()[1].split("=")[1]
+
+ return float(curr_cpu_pressure) > self.rq.max_cpu_pressure or float(curr_io_pressure) > self.rq.max_io_pressure
+ return False

def next_buildable_task(self):
"""
@@ -171,6 +192,8 @@ class RunQueueScheduler(object):
buildable.intersection_update(self.rq.tasks_covered | self.rq.tasks_notcovered)
if not buildable:
return None
+ if self.exceeds_max_pressure():
+ return None

# Filter out tasks that have a max number of threads that have been exceeded
skip_buildable = {}
@@ -1699,6 +1722,8 @@ class RunQueueExecute:

self.number_tasks = int(self.cfgData.getVar("BB_NUMBER_THREADS") or 1)
self.scheduler = self.cfgData.getVar("BB_SCHEDULER") or "speed"
+ self.max_cpu_pressure = float(self.cfgData.getVar("BB_MAX_CPU_SOME_PRESSURE") or 100.0)
+ self.max_io_pressure = float(self.cfgData.getVar("BB_MAX_IO_SOME_PRESSURE") or 100.0)

self.sq_buildable = set()
self.sq_running = set()
@@ -1733,6 +1758,20 @@ class RunQueueExecute:
if self.number_tasks <= 0:
bb.fatal("Invalid BB_NUMBER_THREADS %s" % self.number_tasks)

+ lower_limit = 1.0
+ upper_limit = 100.0
+ if self.max_cpu_pressure < lower_limit:
+ bb.fatal("Invalid BB_MAX_CPU_SOME_PRESSURE %s, minimum value is %s" % (self.max_cpu_pressure, lower_limit))
+ if self.max_cpu_pressure > upper_limit:
+ bb.warn("Percentage value of BB_MAX_CPU_SOME_PRESSURE %s rounded down to %s" % (self.max_cpu_pressure, upper_limit))
+ self.max_cpu_pressure = upper_limit
+
+ if self.max_io_pressure < lower_limit:
+ bb.fatal("Invalid BB_MAX_IO_SOME_PRESSURE %s, minimum value is %s" % (self.max_io_pressure, lower_limit))
+ if self.max_io_pressure > upper_limit:
+ bb.warn("Percentage value of BB_MAX_IO_SOME_PRESSURE %s rounded down to %s" % (self.max_io_pressure, upper_limit))
+ self.max_io_pressure = upper_limit
+
# List of setscene tasks which we've covered
self.scenequeue_covered = set()
# List of tasks which are covered (including setscene ones)
--
2.35.1


[PATCH] buildstats.py: close /proc/pressure/cpu file descriptor

Aryaman Gupta
 

Use python 'with' symantics to ensure that the /proc/pressure/cpu file
descriptor used in SystemStats init is closed. Previously, this would
lead to a single file descriptor being leaked. For example:
ResourceWarning: unclosed file <_io.BufferedReader name='/proc/pressure/cpu'>

Signed-off-by: Aryaman Gupta <aryaman.gupta@...>
---
meta/lib/buildstats.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
index 5d32a81906..99a8303d5e 100644
--- a/meta/lib/buildstats.py
+++ b/meta/lib/buildstats.py
@@ -23,8 +23,8 @@ class SystemStats:
# and ensure that the reduce_proc_pressure directory is not created.
if os.path.exists("/proc/pressure"):
try:
- source = open('/proc/pressure/cpu', 'rb')
- source.read()
+ with open('/proc/pressure/cpu', 'rb') as source:
+ source.read()
pressuredir = os.path.join(bsdir, 'reduced_proc_pressure')
bb.utils.mkdirhier(pressuredir)
file_handlers.extend([('pressure/cpu', self._reduce_pressure),
--
2.35.1