unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: guix-devel@gnu.org
Subject: [PATCH] offload: Fix sorting bug in 'choose-build-machine'
Date: Wed, 17 Jun 2015 14:19:14 -0400	[thread overview]
Message-ID: <87si9qdwpp.fsf@netris.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 150 bytes --]

I noticed that hydra was often offloading builds to the most heavily
loaded of the two MIPS machines.  This patch should fix the problem.

     Mark


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: [PATCH] offload: Fix sorting bug in 'choose-build-machine' --]
[-- Type: text/x-patch, Size: 995 bytes --]

From c2deca27e9310b53457849a5cdb3010989e027ef Mon Sep 17 00:00:00 2001
From: Mark H Weaver <mhw@netris.org>
Date: Wed, 17 Jun 2015 13:55:21 -0400
Subject: [PATCH] offload: Fix sorting bug in 'choose-build-machine'.

* guix/scripts/offload.scm (choose-build-machine)[undecorate]: Return the
  boolean result of pred instead of the best machine+slot.
---
 guix/scripts/offload.scm | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/guix/scripts/offload.scm b/guix/scripts/offload.scm
index e651257..e6be8b4 100644
--- a/guix/scripts/offload.scm
+++ b/guix/scripts/offload.scm
@@ -606,9 +606,7 @@ defines a total order on machines.)"
           ((machine1 slot1)
            (match b
              ((machine2 slot2)
-              (if (pred machine1 machine2)
-                  (list machine1 slot1)
-                  (list machine2 slot2))))))))
+              (pred machine1 machine2)))))))
 
     (let loop ((machines+slots
                 (sort machines+slots
-- 
2.4.3


             reply	other threads:[~2015-06-17 18:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 18:19 Mark H Weaver [this message]
2015-06-17 19:22 ` [PATCH] offload: Fix sorting bug in 'choose-build-machine' Ludovic Courtès

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87si9qdwpp.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=guix-devel@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).