idle kernel changes: run on startup, flashing new kernel after startup #276
No reviewers
Labels
No Milestone
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#276
Loading…
Reference in New Issue
No description provided.
Delete Branch "srenblad/artiq-zynq:idle_kernel_rework_simple"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
idle kernel changes: run on startup, flashing new kernel after startup
Relevant issue: https://github.com/m-labs/artiq/issues/2246
Proposed fix:
Testing
@ -727,0 +733,4 @@
let up_destinations = up_destinations.clone();
let aux_mutex = aux_mutex.clone();
let routing_table = drtio_routing_table.clone();
async move {
isn't there a way to reuse the idle kernel start-up code?
there might be, let me have a look!
d77f141c3c
to1ab13f5799
@esavkin see latest push reusing startup and idle kernel code.
Looks fine to me, except the wording. The new function is not exactly flashing. I would say it better be some verb, that would represent something like
starting the kernel from config
.Let's wait for other reviews.
runtime.comms.rs: run idle kernel on start-upto idle kernel changes: run on startup, flashing new kernel after startupI don't think the
flash_kernel_worker
in session.rs does either. If I was to guess, I would say the original naming is based on the fact that it loads from the flash (ie config) not that it flashes.host_kernel_worker
does the same thing but for experiment runs.@ -641,0 +652,4 @@
info!("Loading {}", config_key);
let _ = load_kernel(&buffer, &control, None)
.await.map_err(|_| warn!("Error loading {}", config_key));
info!("Running idle kernel");
It's not always the idle.
idle kernel changes: run on startup, flashing new kernel after startupto WIP: idle kernel changes: run on startup, flashing new kernel after startup1ab13f5799
toff2e95c35e
ff2e95c35e
to16b0d258c5
WIP: idle kernel changes: run on startup, flashing new kernel after startupto idle kernel changes: run on startup, flashing new kernel after startup@ -721,0 +727,4 @@
timer: GlobalTimer,
) {
info!("Loading idle kernel");
let res = handle_flash_kernel(buffer, control, up_destinations, aux_mutex, routing_table, timer)
formatting
@ -721,0 +730,4 @@
let res = handle_flash_kernel(buffer, control, up_destinations, aux_mutex, routing_table, timer)
.await;
match res {
#[cfg(has_drtio)]
Why does this need to be aware of DRTIO?
DRTIO link status is to be handled manually by the user in idle kernels
Added in #279. Inspecting
handle_flash_kernel
reveals this Error indeed does not occur for idle kernels.@mwojcik safe to remove?
It was there to ensure that DRTIO was fully set up before a startup kernel would run. It could take a considerable while for all required destinations to start. With an idle kernel that can run on startup as well, I would recommend keeping it.
This is for the user to handle. That's why we have an API for it. The behavior hardcoded here of waiting for 1 second is messy and not applicable to all use cases.
Since all subkernels are distributed before the kernel starts (to reduce load and latency when the kernels are actually running), that doesn't give the user an opportunity to act accordingly. However, since idle kernels will be retried and restarted until they can finally run, this check could be removed here.
Idle subkernels and startup subkernels need to be flashed into their respective satellites. I think I mentioned this already.
Oh then it would make perfect sense, but that's feasible only after artiq#2498 is implemented. So to get this PR merged before that, let's remove that part.
16b0d258c5
to456935c9aa
idle kernel changes: run on startup, flashing new kernel after startupto WIP: idle kernel changes: run on startup, flashing new kernel after startupDid not pass testing after changes, marking as WIP until resolved.
WIP: idle kernel changes: run on startup, flashing new kernel after startupto idle kernel changes: run on startup, flashing new kernel after startupIt was a user issue on my end and not a fault of firmware. Successfully tested blinky and idle kernel runs before and after experiment kernels. Ready to merge, assuming no further comments.