From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [OSSTEST PATCH 13/13] Planner: ms-queuedaemon: Restart planning when resources become free Date: Thu, 3 Sep 2015 13:59:07 +0100 Message-ID: <1441285147.26292.363.camel@citrix.com> References: <1441208719-31336-1-git-send-email-ian.jackson@eu.citrix.com> <1441208719-31336-14-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZXU86-0007cz-KG for xen-devel@lists.xenproject.org; Thu, 03 Sep 2015 13:00:38 +0000 In-Reply-To: <1441208719-31336-14-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Wed, 2015-09-02 at 16:45 +0100, Ian Jackson wrote: /me takes a deep breath... > With this arrangemernt we can generate two reports: a `plan' report "arrangement" > Signed-off-by: Ian Jackson > --- > README.planner | 8 +++++ > ms-queuedaemon | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-- I think you may want to add some stuff to .gitignore, data-projection.pl is the main one I can think of. > +proc restarter-maybe-provoke-restart {newly_free} { > + set newly_free {} > + global wasfree > + for-free-resources freeres { > + if {[info exists wasfree($freeres)]} continue > + lappend newly_free $freeres > + set wasfree($freeres) 1 > + } > + if {!$newly_free} { > + log-event "restarter-maybe-provoke-restart nothing" > + return > + } > + > + walker-runvars plan ITYM walker-globals? > + > +proc restarter-restart-now {} { > + # We restart the `plan' walker. Well, actually, if the # Comment wrap damage? ("#" at the end) > + # `projection' walker is not running, we transfer the `plan' > + # walker to it. At this stage the plan walker is not thinking so > + # there are no outstanding callbacks to worry about. > + > + report-plan plan plan > + > + global projection/queue_running > + global plan/queue_running > + > + if {![info exists projection/queue_running]} { > + log-event "queuerun-restart-now projection-idle continue-as" > + set projection/queue_running [set plan/queue_running] What sort of language names the "get" function "set" :-P I didn't spot anything else strange.