guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] offload: Memoize the 'machine-load' procedure


From: Ludovic Courtès
Subject: Re: [PATCH] offload: Memoize the 'machine-load' procedure
Date: Wed, 17 Jun 2015 21:28:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Mark H Weaver <address@hidden> skribis:

> This patch memoizes the 'machine-load' procedure so that the load of
> each build slave is queried only once per call to 'guix offload'.  Apart
> from avoiding wasteful repeated ssh connections, this is needed to
> ensure that all calls to the sorting predicate are consistent with each
> other, which is part of the contract with 'sort'.

Good point.

I don’t think we can memoize it globally.  The reason is that
‘choose-build-machine’ can return #f when all the machines are
overloaded; in that case ‘guix offload’ returns “postpone”, and doesn’t
exit.  Instead, it tries again until at least one machine is not
overloaded.

So I think we should memoize ‘machine-less-loaded-or-faster?’ locally in
‘choose-build-machine’.

WDYT?

Thanks,
Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]