From: Mark Hatle <mark.hatle@windriver.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: david.reyna@windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] "Finish" the IMAGE_GEN_DEBUGFS implementation
Date: Fri, 2 Oct 2015 09:50:18 -0500 [thread overview]
Message-ID: <560E99AA.3000604@windriver.com> (raw)
In-Reply-To: <1443796243.14733.84.camel@linuxfoundation.org>
On 10/2/15 9:30 AM, Richard Purdie wrote:
> On Fri, 2015-10-02 at 09:23 -0500, Mark Hatle wrote:
>> On 10/1/15 5:31 PM, Richard Purdie wrote:
>>> On Thu, 2015-10-01 at 13:26 -0500, Mark Hatle wrote:
>>>> It was noticed today that the IMAGE_GEN_DEBUGFS implementation was not
>>>> complete. The version that was merged back in May only contained the
>>>> filesystem generation pieces, but not the pieces for creating the image
>>>> from that filesystem.
>>>>
>>>> The code has been tested and is working. The only thing that I don't
>>>> particularly like is that the processing code and loop is a duplicate of
>>>> the code that runs just before. Unfortunately the only way around this
>>>> is to change the way that way the parallel bits are processed to support
>>>> multiple datastores.. (or create "another" function..)
>>>>
>>>> Any feedback appreciated, but without this the feature is broken!
>>>
>>> Could we not make a function which these two code points then call?
>>
>> The duplicate piece is because the existing setup and loop depend on the local
>> self.d value(s). In order to do this, we need to temporarily modify self.d and
>> run this under an alternative datastore, and then put it back to the original value.
>>
>> If I don't duplicate the:
>>
>> for image_cmds in debugfs_image_cmd_groups:
>> ...
>> results = list(pool.imap(generate_image, image_cmds))
>> ...
>> for image_type, subimages, script in image_cmds:
>> bb.note("Creating debugfs symlinks for %s image ..." %
>> image_type)
>> self._create_symlinks(subimages)
>>
>> there is no concept of two different datastores.
>>
>> The alternative we have is to include a reference to the datastore itself in the
>> 'image_cmds'. Then we could support any number of datastores as appropriate for
>> the commands. (This of course will require additional changes to be able to
>> pass that datastore to the various users.)
>
> Ah, right. Going from memory, we can't share a datastore with a
> multiprocessing pool. We could do that with a multithreaded pool but I'm
> nervous about that for two reasons, one that we've had bad interaction
> between threads and processes in the past and secondly around locking
> and data usage in the threads.
>
> So not an easy problem...
V2 coming.. it turns out you can avoid the multithread pool issue by making a
few other select changes..
I missed this yesterday when I was floundering trying to get this to work.
--Mark
> Cheers,
>
> Richard
>
prev parent reply other threads:[~2015-10-02 14:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-01 18:26 [PATCH] "Finish" the IMAGE_GEN_DEBUGFS implementation Mark Hatle
2015-10-01 18:26 ` [PATCH] lib/oe/image.py: Add image generation for companion debug filesystem Mark Hatle
2015-10-01 22:31 ` [PATCH] "Finish" the IMAGE_GEN_DEBUGFS implementation Richard Purdie
2015-10-02 14:23 ` Mark Hatle
2015-10-02 14:30 ` Richard Purdie
2015-10-02 14:50 ` Mark Hatle [this message]
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=560E99AA.3000604@windriver.com \
--to=mark.hatle@windriver.com \
--cc=david.reyna@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.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