@@ -78,9 +78,14 @@ snapshot_load_topo( config_t * config ) {
7878
7979 /* "snapwr": Snapshot writer tile */
8080 int vinyl_enabled = config -> firedancer .vinyl .enabled ;
81+ fd_topo_tile_t * snapwr_tile = NULL ;
8182 if ( vinyl_enabled ) {
83+ fd_topob_wksp ( topo , "snapwh" );
84+ fd_topo_tile_t * snapwh_tile = fd_topob_tile ( topo , "snapwh" , "snapwh" , "metric_in" , ULONG_MAX , 0 , 0 );
85+ snapwh_tile -> allow_shutdown = 1 ;
86+
8287 fd_topob_wksp ( topo , "snapwr" );
83- fd_topo_tile_t * snapwr_tile = fd_topob_tile ( topo , "snapwr" , "snapwr" , "metric_in" , ULONG_MAX , 0 , 0 );
88+ snapwr_tile = fd_topob_tile ( topo , "snapwr" , "snapwr" , "metric_in" , ULONG_MAX , 0 , 0 );
8489 snapwr_tile -> allow_shutdown = 1 ;
8590 }
8691
@@ -90,7 +95,9 @@ snapshot_load_topo( config_t * config ) {
9095 fd_topob_wksp ( topo , "snapin_ct" );
9196 fd_topob_wksp ( topo , "snapin_manif" );
9297 fd_topob_wksp ( topo , "snapct_repr" );
93- if ( vinyl_enabled ) fd_topob_wksp ( topo , "snapin_wr" );
98+ if ( vinyl_enabled ) {
99+ fd_topob_wksp ( topo , "snapin_wr" );
100+ }
94101
95102 fd_topob_link ( topo , "snapct_ld" , "snapct_ld" , 128UL , sizeof (fd_ssctrl_init_t ), 1UL );
96103 fd_topob_link ( topo , "snapld_dc" , "snapld_dc" , 16384UL , USHORT_MAX , 1UL );
@@ -99,7 +106,9 @@ snapshot_load_topo( config_t * config ) {
99106 fd_topob_link ( topo , "snapin_manif" , "snapin_manif" , 2UL , sizeof (fd_snapshot_manifest_t ), 1UL )-> permit_no_consumers = 1 ;
100107 fd_topob_link ( topo , "snapct_repr" , "snapct_repr" , 128UL , 0UL , 1UL )-> permit_no_consumers = 1 ;
101108 if ( vinyl_enabled ) {
102- fd_topob_link ( topo , "snapin_wr" , "snapin_wr" , 4UL , 16UL <<20 , 1UL );
109+ fd_topo_link_t * snapin_wh = fd_topob_link ( topo , "snapin_wh" , "snapin_wr" , 4UL , 16UL <<20 , 1UL );
110+ fd_topob_link ( topo , "snapwh_wr" , "snapin_wr" , 4UL , 0UL , 1UL );
111+ fd_pod_insertf_ulong ( topo -> props , 8UL , "obj.%lu.app_sz" , snapin_wh -> dcache_obj_id );
103112 }
104113
105114 fd_topob_tile_in ( topo , "snapct" , 0UL , "metric_in" , "snapin_ct" , 0UL , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
@@ -114,8 +123,11 @@ snapshot_load_topo( config_t * config ) {
114123 fd_topob_tile_out ( topo , "snapin" , 0UL , "snapin_ct" , 0UL );
115124 fd_topob_tile_out ( topo , "snapin" , 0UL , "snapin_manif" , 0UL );
116125 if ( vinyl_enabled ) {
117- fd_topob_tile_out ( topo , "snapin" , 0UL , "snapin_wr" , 0UL );
118- fd_topob_tile_in ( topo , "snapwr" , 0UL , "metric_in" , "snapin_wr" , 0UL , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
126+ fd_topob_tile_out ( topo , "snapin" , 0UL , "snapin_wh" , 0UL );
127+ fd_topob_tile_in ( topo , "snapwh" , 0UL , "metric_in" , "snapin_wh" , 0UL , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
128+ fd_topob_tile_out ( topo , "snapwh" , 0UL , "snapwh_wr" , 0UL );
129+ fd_topob_tile_in ( topo , "snapwr" , 0UL , "metric_in" , "snapwh_wr" , 0UL , FD_TOPOB_RELIABLE , FD_TOPOB_POLLED );
130+ 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 );
119131 }
120132
121133 /* snapin funk / txncache access */
@@ -558,7 +570,9 @@ snapshot_load_cmd_fn( args_t * args,
558570 fd_topo_tile_t * snapld_tile = & topo -> tiles [ fd_topo_find_tile ( topo , "snapld" , 0UL ) ];
559571 fd_topo_tile_t * snapdc_tile = & topo -> tiles [ fd_topo_find_tile ( topo , "snapdc" , 0UL ) ];
560572 fd_topo_tile_t * snapin_tile = & topo -> tiles [ fd_topo_find_tile ( topo , "snapin" , 0UL ) ];
573+ ulong snapwh_idx = fd_topo_find_tile ( topo , "snapwh" , 0UL );
561574 ulong snapwr_idx = fd_topo_find_tile ( topo , "snapwr" , 0UL );
575+ fd_topo_tile_t * snapwh_tile = snapwh_idx != ULONG_MAX ? & topo -> tiles [ snapwh_idx ] : NULL ;
562576 fd_topo_tile_t * snapwr_tile = snapwr_idx != ULONG_MAX ? & topo -> tiles [ snapwr_idx ] : NULL ;
563577
564578 double tick_per_ns = fd_tempo_tick_per_ns ( NULL );
@@ -571,6 +585,7 @@ snapshot_load_cmd_fn( args_t * args,
571585 ulong volatile * const snapld_metrics = fd_metrics_tile ( snapld_tile -> metrics );
572586 ulong volatile * const snapdc_metrics = fd_metrics_tile ( snapdc_tile -> metrics );
573587 ulong volatile * const snapin_metrics = fd_metrics_tile ( snapin_tile -> metrics );
588+ ulong volatile * const snapwh_metrics = snapwh_tile ? fd_metrics_tile ( snapwh_tile -> metrics ) : NULL ;
574589 ulong volatile * const snapwr_metrics = snapwr_tile ? fd_metrics_tile ( snapwr_tile -> metrics ) : NULL ;
575590
576591 ulong total_off_old = 0UL ;
@@ -584,6 +599,7 @@ snapshot_load_cmd_fn( args_t * args,
584599 ulong snapdc_wait_old = 0UL ;
585600 ulong snapin_backp_old = 0UL ;
586601 ulong snapin_wait_old = 0UL ;
602+ ulong snapwh_wait_old = 0UL ;
587603 ulong snapwr_wait_old = 0UL ;
588604 ulong acc_cnt_old = 0UL ;
589605
@@ -600,7 +616,7 @@ snapshot_load_cmd_fn( args_t * args,
600616 fputs ( "--------------------------------------------" , stdout );
601617 if ( snapwr_tile ) fputs ( "--------------" , stdout );
602618 fputs ( "[ct],[ld],[dc],[in]--------[ct],[ld],[dc],[in]" , stdout );
603- if ( snapwr_tile ) fputs ( ",[wr]" , stdout );
619+ if ( snapwr_tile ) fputs ( ",[wh],[ wr]" , stdout );
604620 puts ( "--------------" );
605621 }
606622
@@ -633,8 +649,11 @@ snapshot_load_cmd_fn( args_t * args,
633649 ulong snapdc_wait = snapdc_metrics [ MIDX ( COUNTER , TILE , REGIME_DURATION_NANOS_CAUGHT_UP_POSTFRAG ) ] + snapdc_backp ;
634650 ulong snapin_backp = snapin_metrics [ MIDX ( COUNTER , TILE , REGIME_DURATION_NANOS_BACKPRESSURE_PREFRAG ) ];
635651 ulong snapin_wait = snapin_metrics [ MIDX ( COUNTER , TILE , REGIME_DURATION_NANOS_CAUGHT_UP_POSTFRAG ) ] + snapin_backp ;
652+ ulong snapwh_wait = 0UL ;
636653 ulong snapwr_wait = 0UL ;
637654 if ( snapwr_tile ) {
655+ snapwh_wait = snapwh_metrics [ MIDX ( COUNTER , TILE , REGIME_DURATION_NANOS_CAUGHT_UP_POSTFRAG ) ] +
656+ snapwh_metrics [ MIDX ( COUNTER , TILE , REGIME_DURATION_NANOS_BACKPRESSURE_PREFRAG ) ];
638657 snapwr_wait = snapwr_metrics [ MIDX ( COUNTER , TILE , REGIME_DURATION_NANOS_CAUGHT_UP_POSTFRAG ) ] +
639658 snapwr_metrics [ MIDX ( COUNTER , TILE , REGIME_DURATION_NANOS_BACKPRESSURE_PREFRAG ) ];
640659 }
@@ -662,14 +681,14 @@ snapshot_load_cmd_fn( args_t * args,
662681 100 - ( ( (double )( snapdc_wait - snapdc_wait_old )* ns_per_tick )/1e7 ),
663682 100 - ( ( (double )( snapin_wait - snapin_wait_old )* ns_per_tick )/1e7 ) );
664683 if ( snapwr_tile ) {
665- printf ( ",%3.0f%%" ,
684+ printf ( ",%3.0f%%,%3.0f%%" ,
685+ 100 - ( ( (double )( snapwh_wait - snapwh_wait_old )* ns_per_tick )/1e7 ),
666686 100 - ( ( (double )( snapwr_wait - snapwr_wait_old )* ns_per_tick )/1e7 ) );
667687 }
668688 printf ( ") acc=%4.1f M/s\n" ,
669689 (double )( acc_cnt - acc_cnt_old )/1e6 );
670690 fflush ( stdout );
671691 }
672-
673692 total_off_old = total_off ;
674693 decomp_off_old = decomp_off ;
675694 vinyl_off_old = vinyl_off ;
@@ -681,6 +700,7 @@ snapshot_load_cmd_fn( args_t * args,
681700 snapdc_wait_old = snapdc_wait ;
682701 snapin_backp_old = snapin_backp ;
683702 snapin_wait_old = snapin_wait ;
703+ snapwh_wait_old = snapwh_wait ;
684704 snapwr_wait_old = snapwr_wait ;
685705 acc_cnt_old = acc_cnt ;
686706
0 commit comments