unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] offload: Fix sorting bug in 'choose-build-machine'
@ 2015-06-17 18:19 Mark H Weaver
  2015-06-17 19:22 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Mark H Weaver @ 2015-06-17 18:19 UTC (permalink / raw)
  To: guix-devel

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] offload: Fix sorting bug in 'choose-build-machine'
  2015-06-17 18:19 [PATCH] offload: Fix sorting bug in 'choose-build-machine' Mark H Weaver
@ 2015-06-17 19:22 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-06-17 19:22 UTC (permalink / raw)
  To: Mark H Weaver; +Cc: guix-devel

Mark H Weaver <mhw@netris.org> skribis:

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

Good catch, please push!

Apologies for the bad resource usage on Hydra for all this time...

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-17 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-17 18:19 [PATCH] offload: Fix sorting bug in 'choose-build-machine' Mark H Weaver
2015-06-17 19:22 ` Ludovic Courtès

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