From: "Clément Lassieur" <clement@lassieur.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 32121@debbugs.gnu.org
Subject: [bug#32121] [PATCH 1/5] base: Compile CHECKOUT in the fiber.
Date: Fri, 13 Jul 2018 13:57:43 +0200 [thread overview]
Message-ID: <87r2k71h6w.fsf@lassieur.org> (raw)
In-Reply-To: <87fu0njqwy.fsf@gnu.org>
Ludovic Courtès <ludo@gnu.org> writes:
> Clément Lassieur <clement@lassieur.org> skribis:
>
>> Ludovic Courtès <ludo@gnu.org> writes:
>>
>>> Morning!
>>>
>>> Clément Lassieur <clement@lassieur.org> skribis:
>>>
>>>> Because it may take time and thus prevent PROCESS-SPECS to run every INTERVAL
>>>> seconds.
>>>>
>>>> * src/cuirass/base.scm (process-specs): move the COMPILE invocation inside
>>>> SPAWN-FIBER's thunk. Add log message.
>>>
>>> [...]
>>>
>>>> - (when compile?
>>>> - (non-blocking (compile checkout)))
>>>> -
>>>> (spawn-fiber
>>>> (lambda ()
>>>> + (when compile?
>>>> + (log-message "compiling '~a' with commit ~s" name commit)
>>>> + (non-blocking (compile checkout)))
>>>
>>> I think this doesn’t bring anything compared to the existing
>>> ‘non-blocking’ call.
>>> The ‘non-blocking’ procedure evaluates its argument in a separate
>>> thread; the calling fiber then “waits” for a message from that thread,
>>> which it gets when the computation is over. The ‘get-message’ is
>>> non-blocking though: the calling fiber is simply unscheduled until the
>>> message has arrived.
>>>
>>> Does that make sense?
>>
>> Well, no :-)
>>
>> My understanding is that non-blocking is, actually... blocking, because
>> get-message is blocking. (It doesn't block the scheduler because it's
>> in another thread, but that's not the problem here.)
>>
>> What I wanted to fix here is the fact that if the build takes one hour,
>> we will block for one hour in the COMPILE call, and process-spec won't
>> return for one hour. If it doesn't return for one hour, that means we
>> can't evaluate anything else for all that time.
>
> Oh, I see. However we have to wait for compilation to complete before
> continuing anyway, no?
Yes, for continuing that specific evaluation. But other evaluations
would happen in the meantime.
>> With my change, the one-hour call will be in the fiber, which means that
>> process-spec can return, and other evaluations can be processed.
>>
>> But this is untested (because compilation doesn't work IIRC), so I can't
>> be sure.
>
> Yeah, what about this plan: let’s forget about this patch, and let’s
> remove support for compilation altogether in a future patch.
>
> WDYT?
Agreed!
prev parent reply other threads:[~2018-07-13 11:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-10 22:58 [bug#32121] Cuirass: add support for multiple inputs Clément Lassieur
2018-07-10 23:02 ` [bug#32121] [PATCH 1/5] base: Compile CHECKOUT in the fiber Clément Lassieur
2018-07-10 23:02 ` [bug#32121] [PATCH 2/5] utils: Reset the Fiber dynamic environment in %NON-BLOCKING Clément Lassieur
2018-07-13 8:35 ` Ludovic Courtès
2018-07-14 12:13 ` Clément Lassieur
2018-07-14 13:45 ` Ludovic Courtès
2018-07-10 23:02 ` [bug#32121] [PATCH 3/5] database: Add support for database upgrades Clément Lassieur
2018-07-13 8:47 ` Ludovic Courtès
2018-07-14 15:00 ` Clément Lassieur
2018-07-14 15:32 ` Clément Lassieur
2018-07-16 13:17 ` Ludovic Courtès
2018-07-10 23:02 ` [bug#32121] [PATCH 4/5] database: Call a specification 'jobset' instead of 'project' Clément Lassieur
2018-07-13 8:51 ` Ludovic Courtès
2018-07-13 9:35 ` Clément Lassieur
2018-07-13 9:43 ` Clément Lassieur
2018-07-13 11:56 ` Ludovic Courtès
2018-07-14 19:57 ` Clément Lassieur
2018-07-10 23:02 ` [bug#32121] [PATCH 5/5] Add support for multiple inputs Clément Lassieur
2018-07-13 9:28 ` Ludovic Courtès
2018-07-15 8:25 ` Clément Lassieur
2018-07-16 20:13 ` bug#32121: " Clément Lassieur
2018-07-13 8:32 ` [bug#32121] [PATCH 1/5] base: Compile CHECKOUT in the fiber Ludovic Courtès
2018-07-13 8:55 ` Clément Lassieur
2018-07-13 11:50 ` Ludovic Courtès
2018-07-13 11:57 ` Clément Lassieur [this message]
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=87r2k71h6w.fsf@lassieur.org \
--to=clement@lassieur.org \
--cc=32121@debbugs.gnu.org \
--cc=ludo@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 external index
https://git.savannah.gnu.org/cgit/guix.git
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.