Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Mark Hatle <mark.hatle@windriver.com>
Cc: david.reyna@windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] "Finish" the IMAGE_GEN_DEBUGFS implementation
Date: Fri, 02 Oct 2015 15:30:43 +0100	[thread overview]
Message-ID: <1443796243.14733.84.camel@linuxfoundation.org> (raw)
In-Reply-To: <560E9351.90003@windriver.com>

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...

Cheers,

Richard



  reply	other threads:[~2015-10-02 14:30 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 [this message]
2015-10-02 14:50       ` Mark Hatle

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=1443796243.14733.84.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=david.reyna@windriver.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