-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shred: notify replay tile of completed shreds (do not merge) #4361
base: main
Are you sure you want to change the base?
Conversation
src/app/fdctl/run/tiles/fd_shred.c
Outdated
|
||
fd_stem_publish( stem, STORE_OUT_IDX, new_sig, fd_laddr_to_chunk( ctx->store_out_mem, s34+3UL ), sz3, 0UL, ctx->tsorig, tspub ); | ||
|
||
/* Send to replay tile */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wouldn't add a 2nd publish here, which will break Frankendancer.
The publish is "either or" (either shred_store, or shred_replay), so you can just make sure in unprivileged_init
you either have one shred_store
or one shred_replay
, and then set STORE_OUT_IDX
(maybe rename SHRED_OUT_IDX
?) to that link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep I have a change that conditions the second publish - but I think we want to keep both the shred_store and shred_replay link for firedancer for now to roll this change out slowly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can ifdef that link too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually we're changing the sig so dont think we can reuse the link like this @mmcgee-jump
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't want to use the ifdef, Richie is going to remove that pretty soon. The tile should work for either topology without recompilation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well we need to figure out a sig that works for both then. it looks like all the FFI store needs is a single bit sig
field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't want to use the ifdef, Richie is going to remove that pretty soon.
why?
The tile should work for either topology without recompilation.
i dont see how we can make this work with the shred tile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell you could do this change in two lines of code by just creating a "shred_store" link in the fd_firedancer topology that goes to replay instead of store, and then updating the sig so it works for both consumers. Then it can be compiled once and linked by either library, too, and doesn't pollute the file with a bunch of ifdefs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah thats what i meant in my comment above about changing the sig of msgs on the link. but i dont see how we can modify the shred tile's stem publish or blcokstore_insert without an ifdef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well at a minimum it can be an if rather than an ifdef. The tiles are library code built in disco, so it doesn't make sense to push application knowledge (frankendancer vs full firedancer) into there.
Basically you should just build this as generic library functionality in the tile, probably I would add an argument to the tile topo or whatever ulong blockstore_obj_id
and if this is not ULONG_MAX, you store shreds directly into there before broadcasting. Nothing else really needs to change except the signature?
6770793
to
ec45d1c
Compare
5ed3302
to
000f6fb
Compare
src/app/fdctl/run/tiles/fd_replay.c
Outdated
ulong slot = fd_disco_shred_sig_slot( sig ); | ||
ushort parent_off = fd_disco_shred_sig_parent_off( sig ); | ||
uint fec_idx = fd_disco_shred_sig_fec_idx( sig ); | ||
uchar flags = fd_disco_shred_sig_flags( sig ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fmt
src/app/fdctl/run/tiles/fd_shred.c
Outdated
@@ -91,6 +95,7 @@ | |||
#define STORE_OUT_IDX 0 | |||
#define NET_OUT_IDX 1 | |||
#define SIGN_OUT_IDX 2 | |||
#define MULTI_OUT_IDX 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replay_out?
src/app/fdctl/run/tiles/fd_shred.c
Outdated
#if FD_HAS_NO_AGAVE | ||
/* Store shreds to blockstore */ | ||
for( ulong i=0UL; i<set->data_shred_cnt; i++ ) { | ||
fd_shred_t const * data_shred = (fd_shred_t const *)set->data_shreds[ i ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need type pun
src/disco/fd_disco_base.h
Outdated
@@ -121,6 +121,29 @@ fd_disco_replay_sig( ulong slot, | |||
FD_FN_CONST static inline ulong fd_disco_replay_sig_flags( ulong sig ) { return (sig & 0xFFUL); } | |||
FD_FN_CONST static inline ulong fd_disco_replay_sig_slot( ulong sig ) { return (sig >> 8); } | |||
|
|||
FD_FN_CONST static inline ulong | |||
fd_disco_shred_sig( ulong slot, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replay_sig
src/disco/fd_disco_base.h
Outdated
| slot[32:63] | parent_off[24:31] | shred_idx[9:23] | shred_flags[8:1] | is_turbine[0:0] | | ||
*/ | ||
return ((slot & 0xFFFFFFFF) << 32 ) | ||
| ((ulong)(parent_off & 0xFF) << 24 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overflow check might be able to do something fancy with fd_bits
995caf2
to
7353796
Compare
50eb493
to
3421893
Compare
3421893
to
cb66392
Compare
No description provided.