Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/app/firedancer-dev/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,7 @@ extern fd_topo_run_tile_t fd_tile_archiver_feeder;
extern fd_topo_run_tile_t fd_tile_archiver_writer;
extern fd_topo_run_tile_t fd_tile_archiver_playback;

extern fd_topo_run_tile_t fd_tile_bencho;
extern fd_topo_run_tile_t fd_tile_benchg;
extern fd_topo_run_tile_t fd_tile_benchs;
extern fd_topo_run_tile_t fd_tile_snapshot_restore_FileRd;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you just name these the same as everything else? Pick something 6 characters, so it can be the same name across everywhere (tile code, GUI, monitor, ...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's please do the hard part first (write the actual feature), you can rename them later

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardest part is naming things :)


fd_topo_run_tile_t * TILES[] = {
&fd_tile_net,
Expand Down Expand Up @@ -131,9 +129,7 @@ fd_topo_run_tile_t * TILES[] = {
&fd_tile_archiver_feeder,
&fd_tile_archiver_writer,
&fd_tile_archiver_playback,
&fd_tile_bencho,
&fd_tile_benchg,
&fd_tile_benchs,
&fd_tile_snapshot_restore_FileRd,
NULL,
};

Expand Down
2 changes: 1 addition & 1 deletion src/disco/stem/fd_stem.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
struct fd_stem_context {
fd_frag_meta_t ** mcaches;
ulong * seqs;
ulong * depths;
ulong const * depths;

ulong * cr_avail;
ulong cr_decrement_amount;
Expand Down
4 changes: 4 additions & 0 deletions src/disco/topo/fd_topo.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,10 @@ typedef struct {
int archive_fd;
} archiver;

struct {
char file_path[ PATH_MAX ];
} filerd;

};
} fd_topo_tile_t;

Expand Down
4 changes: 3 additions & 1 deletion src/disco/topo/fd_topob.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fd_topob_obj( fd_topo_t * topo,
return obj;
}

void
fd_topo_link_t *
fd_topob_link( fd_topo_t * topo,
char const * link_name,
char const * wksp_name,
Expand Down Expand Up @@ -100,6 +100,8 @@ fd_topob_link( fd_topo_t * topo,
FD_TEST( fd_pod_insertf_ulong( topo->props, mtu, "obj.%lu.mtu", obj->id ) );
}
topo->link_cnt++;

return link;
}

void
Expand Down
2 changes: 1 addition & 1 deletion src/disco/topo/fd_topob.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fd_topob_tile_uses( fd_topo_t * topo,
can have no backing data buffer, a dcache, or a reassembly buffer
behind it. */

void
fd_topo_link_t *
fd_topob_link( fd_topo_t * topo,
char const * link_name,
char const * wksp_name,
Expand Down
1 change: 1 addition & 0 deletions src/discof/restore/Local.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$(call add-objs,fd_filerd_tile,fd_discof)
35 changes: 35 additions & 0 deletions src/discof/restore/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Snapshot Restore

## Stream link conventions

Various snapshot components use byte streams, not packet streams.

These require custom conventions.

**Stream fragment descriptors**

Byte streams use `fd_frag_stream_meta_t` (defined in `fd_restore_base.h`).

These have the following changes:
- `chunk` is replaced by `goff` and `loff`, which are 64-bit offsets
describing the stream offset and dcache offset respectively
- `tsorig` / `tspub` are removed (latency is less relevant)
- `sig` is removed (cannot filter without looking at stream data)
- `sz` is widened to 32 bits.

`**Dcache allocations**

Payloads in stream dcaches are unaligned. Payloads are addressed with
uncompressed byte offsets relative to the workspace start.

(Compare this to the usual compact packet dcaches, which use 64 byte
aligned chunks with compressed addressing.)

**Stream backpressure**

Byte streams naturally require a reliable transport.

Consumers periodically publish their progress in `fseq`.
- `fseq[0]` is the lowest sequence number not yet consumed (standard)
- `fseq[1]` is the stream offset of the next byte not yet consumed
`
Loading
Loading