[Rpm-maint] [rpm-software-management/rpm] Enable thread autodetection for a parallel compression. (#1324)

Panu Matilainen notifications at github.com
Wed Aug 19 06:43:18 UTC 2020


@pmatilai commented on this pull request.



> +/* Return number of threads ought to be used for compression based
+   on a parsed value threads (e.g. from w7T0.xzdio or w7T16.xzdio).
+   Value -1 means automatic detection. */
+
+static int
+get_compression_threads (int threads)
+{
+    if (threads == -1)
+	threads = rpmExpandNumeric("%{getncpus}");
+
+#if __WORDSIZE == 32
+    /* Limit thread up to 4 for 32-bit systems.  */
+    if (threads > 4)
+    {
+	threads = 4;
+	rpmlog(RPMLOG_WARNING, "threading compression limited to 4 threads on 32-bit systems\n");

I think this should be RPMLOG_DEBUG instead to avoid spewage on systems where it actually gets activated.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1324#pullrequestreview-470165744
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20200818/16688cfc/attachment.html>


More information about the Rpm-maint mailing list