All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Ohly <patrick.ohly@intel.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 2/4] runqueue.py: monitor disk space at regular time intervals
Date: Mon, 28 Nov 2016 17:30:13 +0100	[thread overview]
Message-ID: <1480350613.6873.199.camel@intel.com> (raw)
In-Reply-To: <1480348730.28508.185.camel@linuxfoundation.org>

On Mon, 2016-11-28 at 15:58 +0000, Richard Purdie wrote:
> On Mon, 2016-11-28 at 16:15 +0100, Patrick Ohly wrote:
> >          # For disk space monitor
> > +        # Invoked at regular time intervals via the bitbake
> > heartbeat event
> > +        # while the build is running.
> >          self.dm = monitordisk.diskMonitor(cfgData)
> > +        bb.event.register('_bb_diskmonitor',
> > +                          lambda x: self.dm.check(self) if
> > self.state in [runQueueSceneRun, runQueueRunning, runQueueCleanUp]
> > else False,
> > +                          ('bb.event.HeartbeatEvent',))
> >  
[...]
> Don't we have to unregister this at some point too? Cooker can persist
> across multiple builds (although its not the default).

Indeed, that case will need further work. I hadn't considered that. What
would be a good point to unregister the event handler? Perhaps the
cleanup code after "if (self.state is runQueueComplete or self.state is
runQueueFailed) and self.rqexe" in _execute_runqueue()?

Just for my understanding, is there guaranteed to be only one RunQueue
instance in the cooker process or could there be more than one at the
same time? Can there be more than one event handler with the same name
(the first parameter of bb.event.register)?

Is the non-default case the memory-resident bitbake?

The buildstats.py code I posted for OE-core has a similar issue. It
assumes that files can be opened when the class gets instantiated and
kept open as long as the process runs.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.





  reply	other threads:[~2016-11-28 16:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28 15:15 [PATCH 0/4] system statistics sampling Patrick Ohly
2016-11-28 15:15 ` [PATCH 1/4] cooker process: fire heartbeat event at regular time intervals Patrick Ohly
2016-11-28 15:15 ` [PATCH 2/4] runqueue.py: monitor disk space " Patrick Ohly
2016-11-28 15:58   ` Richard Purdie
2016-11-28 16:30     ` Patrick Ohly [this message]
2016-11-28 15:15 ` [PATCH 3/4] monitordisk.py: minor code and comment cleanup Patrick Ohly
2016-11-28 15:15 ` [PATCH 4/4] monitordisk: add event Patrick Ohly

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=1480350613.6873.199.camel@intel.com \
    --to=patrick.ohly@intel.com \
    --cc=bitbake-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.