@@ -105,7 +105,9 @@ backtest_topo( config_t * config ) {
105105 /**********************************************************************/
106106 /* Add the snapshot tiles to topo */
107107 /**********************************************************************/
108+ int vinyl_enabled = config -> firedancer .vinyl .enabled ;
108109 fd_topo_tile_t * snapin_tile = NULL ;
110+ fd_topo_tile_t * snapwr_tile = NULL ;
109111 if ( FD_UNLIKELY ( !disable_snap_loader ) ) {
110112 fd_topob_wksp ( topo , "snapct" );
111113 fd_topob_wksp ( topo , "snapld" );
@@ -129,6 +131,16 @@ backtest_topo( config_t * config ) {
129131 snapld_tile -> allow_shutdown = 1 ;
130132 snapdc_tile -> allow_shutdown = 1 ;
131133 snapin_tile -> allow_shutdown = 1 ;
134+
135+ if ( vinyl_enabled ) {
136+ fd_topob_wksp ( topo , "snapwh" );
137+ fd_topo_tile_t * snapwh_tile = fd_topob_tile ( topo , "snapwh" , "snapwh" , "metric_in" , cpu_idx ++ , 0 , 0 );
138+ snapwh_tile -> allow_shutdown = 1 ;
139+
140+ fd_topob_wksp ( topo , "snapwr" );
141+ snapwr_tile = fd_topob_tile ( topo , "snapwr" , "snapwr" , "metric_in" , cpu_idx ++ , 0 , 0 );
142+ snapwr_tile -> allow_shutdown = 1 ;
143+ }
132144 } else {
133145 fd_topob_wksp ( topo , "genesi" );
134146 fd_topob_tile ( topo , "genesi" , "genesi" , "metric_in" , cpu_idx ++ , 0 , 0 )-> allow_shutdown = 1 ;
@@ -169,6 +181,10 @@ backtest_topo( config_t * config ) {
169181 fd_topob_wksp ( topo , "snapin_ls" );
170182 }
171183
184+ if ( vinyl_enabled ) {
185+ fd_topob_wksp ( topo , "snapin_wr" );
186+ }
187+
172188 fd_topob_link ( topo , "snapct_ld" , "snapct_ld" , 128UL , sizeof (fd_ssctrl_init_t ), 1UL );
173189 fd_topob_link ( topo , "snapld_dc" , "snapld_dc" , 16384UL , USHORT_MAX , 1UL );
174190 fd_topob_link ( topo , "snapdc_in" , "snapdc_in" , 16384UL , USHORT_MAX , 1UL );
@@ -184,6 +200,12 @@ backtest_topo( config_t * config ) {
184200 /**/ fd_topob_link( topo, " snapls_ct ", " snapls_ct ", 128UL, 0UL, 1UL );
185201 }
186202
203+ if ( vinyl_enabled ) {
204+ fd_topo_link_t * snapin_wh = fd_topob_link ( topo , "snapin_wh" , "snapin_wr" , 4UL , 16UL <<20 , 1UL );
205+ fd_topob_link ( topo , "snapwh_wr" , "snapin_wr" , 4UL , 0UL , 1UL );
206+ fd_pod_insertf_ulong ( topo -> props , 8UL , "obj.%lu.app_sz" , snapin_wh -> dcache_obj_id );
207+ }
208+
187209 if ( FD_UNLIKELY ( snapshot_lthash_disabled ) ) {
188210 fd_topob_tile_in ( topo , "snapct" , 0UL , "metric_in" , "snapin_ct" , 0UL , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
189211 } else {
@@ -213,6 +235,14 @@ backtest_topo( config_t * config ) {
213235 FOR (lta_tile_cnt ) fd_topob_tile_in ( topo , "snapls ", 0UL, " metric_in ", " snapla_ls ", i, FD_TOPOB_RELIABLE, FD_TOPOB_POLLED );
214236 /**/ fd_topob_tile_out( topo, " snapls ", 0UL, " snapls_ct ", 0UL );
215237 }
238+
239+ if ( vinyl_enabled ) {
240+ fd_topob_tile_out ( topo , "snapin" , 0UL , "snapin_wh" , 0UL );
241+ fd_topob_tile_in ( topo , "snapwh" , 0UL , "metric_in" , "snapin_wh" , 0UL , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
242+ fd_topob_tile_out ( topo , "snapwh" , 0UL , "snapwh_wr" , 0UL );
243+ fd_topob_tile_in ( topo , "snapwr" , 0UL , "metric_in" , "snapwh_wr" , 0UL , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
244+ fd_topob_tile_uses ( topo , snapwr_tile , & topo -> objs [ topo -> links [ fd_topo_find_link ( topo , "snapin_wh" , 0UL ) ].dcache_obj_id ], FD_SHMEM_JOIN_MODE_READ_ONLY );
245+ }
216246 } else {
217247 fd_topob_wksp ( topo , "genesi_out" );
218248 fd_topob_link ( topo , "genesi_out" , "genesi_out" , 2UL , 10UL * 1024UL * 1024UL + 32UL + sizeof (fd_lthash_value_t ), 1UL );
0 commit comments