From: Alexander Kanavin <alexander.kanavin@linux.intel.com>
To: Mark Hatle <mark.hatle@windriver.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [PATCHv2 2/2] rpm: run binary package generation via thread pools
Date: Fri, 9 Jun 2017 14:18:43 +0300 [thread overview]
Message-ID: <124a1c9e-a6e8-374e-b549-7512410c6588@linux.intel.com> (raw)
In-Reply-To: <b34441c5-e2a8-3791-4402-e0edcb745f06@linux.intel.com>
On 06/09/2017 12:02 PM, Alexander Kanavin wrote:
> Ah, now I get you. You are saying that if these functions are executed
> once at the start to pre-populate the static data, then they
> subsequently become thread-safe. Unfortunately this is not the case: I
> have no idea why this happens, as they would only read static data, but
> when I did that (in the first iteration of the patch which used nspr
> instead of openmp), there was a very rare, but still happening data
> corruption issue. There was no explicit first call, but the first
> package was built ahead of others (for other reasons, and it still is),
> and that's where the first call happened.
Actually, looking at code again, that may not be true - building a first
package may not necessarily guarantee the pre-population of static data.
See what I mean about code that is hard to reason about? It's best to
get rid of static data altogether, even if it makes for a larger patch.
Alex
next prev parent reply other threads:[~2017-06-09 11:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 14:42 [PATCHv2 0/2] Multi-threaded RPM support Alexander Kanavin
2017-06-08 14:42 ` [PATCHv2 1/2] package_rpm.bbclass: use multithreaded xz compression Alexander Kanavin
2017-06-08 14:42 ` [PATCHv2 2/2] rpm: run binary package generation via thread pools Alexander Kanavin
2017-06-08 16:55 ` Mark Hatle
2017-06-08 17:23 ` Alexander Kanavin
2017-06-08 20:29 ` Mark Hatle
2017-06-09 9:02 ` Alexander Kanavin
2017-06-09 11:18 ` Alexander Kanavin [this message]
2017-06-08 21:15 ` [PATCHv2 0/2] Multi-threaded RPM support Leonardo Sandoval
2017-06-09 9:13 ` Alexander Kanavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=124a1c9e-a6e8-374e-b549-7512410c6588@linux.intel.com \
--to=alexander.kanavin@linux.intel.com \
--cc=mark.hatle@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox