Skip to content

Commit 5b9426d

Browse files
Revert "funk, topo, util: make Funk workspace use unpinned pages"
This reverts commit 64ae55c.
1 parent 64ae55c commit 5b9426d

File tree

25 files changed

+47
-317
lines changed

25 files changed

+47
-317
lines changed

.github/workflows/backtest.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,3 @@ jobs:
4343
sudo prlimit --pid=$$ --nofile=1048576
4444
sudo prlimit --pid=$$ --memlock=unlimited
4545
DUMP_DIR=../dump make run-runtime-backtest
46-
47-
- name: fini
48-
if: always()
49-
run: |
50-
sudo $OBJDIR/bin/firedancer-dev configure fini all --config ../dump/mainnet-308392063-v2.3.0_backtest.toml

contrib/offline-replay/offline_replay.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,3 @@
4040
[paths]
4141
identity_key = "{identity_key_path}"
4242
vote_account = "{vote_account_path}"
43-
[hugetlbfs]
44-
mount_path = "/data/firedancer/mnt"

src/app/firedancer-dev/main.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,11 @@ extern configure_stage_t fd_cfg_stage_kill;
5454
extern configure_stage_t fd_cfg_stage_netns;
5555
extern configure_stage_t fd_cfg_stage_genesis;
5656
extern configure_stage_t fd_cfg_stage_keys;
57-
extern configure_stage_t fd_cfg_stage_normalpage;
5857

5958
configure_stage_t * STAGES[] = {
6059
&fd_cfg_stage_kill,
6160
&fd_cfg_stage_netns,
6261
&fd_cfg_stage_hugetlbfs,
63-
&fd_cfg_stage_normalpage,
6462
&fd_cfg_stage_sysctl,
6563
&fd_cfg_stage_hyperthreads,
6664
&fd_cfg_stage_ethtool_channels,

src/app/firedancer/topology.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,9 @@ setup_topo_funk( fd_topo_t * topo,
112112
ulong wksp_idx = fd_topo_find_wksp( topo, wksp_name );
113113
FD_TEST( wksp_idx!=ULONG_MAX );
114114
fd_topo_wksp_t * wksp = &topo->workspaces[ wksp_idx ];
115-
ulong part_max = fd_wksp_part_max_est( funk_footprint+(heap_size_gib*(1UL<<30)), 1U<<14U );
115+
ulong part_max = fd_wksp_part_max_est( funk_footprint, 1U<<14U );
116116
if( FD_UNLIKELY( !part_max ) ) FD_LOG_ERR(( "fd_wksp_part_max_est(%lu,16KiB) failed", funk_footprint ));
117117
wksp->part_max += part_max;
118-
wksp->is_locked = 0;
119118

120119
return obj;
121120
}

src/app/shared/commands/run/run.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,6 @@ workspace_path( config_t const * config,
477477
case FD_SHMEM_GIGANTIC_PAGE_SZ:
478478
mount_path = config->hugetlbfs.gigantic_page_mount_path;
479479
break;
480-
case FD_SHMEM_NORMAL_PAGE_SZ:
481-
mount_path = config->hugetlbfs.normal_page_mount_path;
482-
break;
483480
default:
484481
FD_LOG_ERR(( "invalid page size %lu", wksp->page_sz ));
485482
}
@@ -519,7 +516,6 @@ warn_unknown_files( config_t const * config,
519516
int known_file = 0;
520517
for( ulong i=0UL; i<config->topo.wksp_cnt; i++ ) {
521518
fd_topo_wksp_t const * wksp = &config->topo.workspaces[ i ];
522-
if( !wksp->is_locked ) continue;
523519

524520
char expected_path[ PATH_MAX ];
525521
workspace_path( config, wksp, expected_path );

src/app/shared/fd_config.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,6 @@ fd_config_fill( fd_config_t * config,
292292
NULL,
293293
"%s/.huge",
294294
config->hugetlbfs.mount_path ) );
295-
FD_TEST( fd_cstr_printf_check( config->hugetlbfs.normal_page_mount_path,
296-
sizeof(config->hugetlbfs.normal_page_mount_path),
297-
NULL,
298-
"%s/.normal",
299-
config->hugetlbfs.mount_path ) );
300295

301296
ulong max_page_sz = fd_cstr_to_shmem_page_sz( config->hugetlbfs.max_page_size );
302297
if( FD_UNLIKELY( max_page_sz!=FD_SHMEM_HUGE_PAGE_SZ && max_page_sz!=FD_SHMEM_GIGANTIC_PAGE_SZ ) ) FD_LOG_ERR(( "[hugetlbfs.max_page_size] must be \"huge\" or \"gigantic\"" ));

src/app/shared/fd_config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,6 @@ struct fd_config {
253253
struct {
254254
char gigantic_page_mount_path[ PATH_MAX ];
255255
char huge_page_mount_path[ PATH_MAX ];
256-
char normal_page_mount_path[ PATH_MAX ];
257256
char mount_path[ PATH_MAX ];
258257
char max_page_size[ 16 ];
259258
ulong gigantic_page_threshold_mib;

src/app/shared_dev/Local.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ $(call add-objs,commands/configure/kill,fddev_shared)
3030
ifdef FD_HAS_INT128
3131
$(call add-objs,commands/configure/genesis,fddev_shared)
3232
endif
33-
$(call add-objs,commands/configure/normalpage,fddev_shared)
3433

3534
endif
3635
endif

src/app/shared_dev/commands/configure/normalpage.c

Lines changed: 0 additions & 103 deletions
This file was deleted.

src/disco/topo/fd_topo.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fd_topo_join_workspace( fd_topo_t * topo,
1717
char name[ PATH_MAX ];
1818
FD_TEST( fd_cstr_printf_check( name, PATH_MAX, NULL, "%s_%s.wksp", topo->app_name, wksp->name ) );
1919

20-
wksp->wksp = fd_wksp_join( fd_shmem_join( name, mode, NULL, NULL, NULL, wksp->is_locked ) );
20+
wksp->wksp = fd_wksp_join( fd_shmem_join( name, mode, NULL, NULL, NULL ) );
2121
if( FD_UNLIKELY( !wksp->wksp ) ) FD_LOG_ERR(( "fd_wksp_join failed" ));
2222
}
2323

@@ -82,17 +82,15 @@ fd_topo_create_workspace( fd_topo_t * topo,
8282
ulong sub_cpu_idx [ 1 ] = { fd_shmem_cpu_idx( wksp->numa_idx ) };
8383

8484
int err;
85-
if( FD_UNLIKELY( !wksp->is_locked ) ) {
86-
err = fd_shmem_create_multi_unlocked( name, wksp->page_sz, wksp->page_cnt, S_IRUSR | S_IWUSR ); /* logs details */
87-
} else if( FD_UNLIKELY( update_existing ) ) {
85+
if( FD_UNLIKELY( update_existing ) ) {
8886
err = fd_shmem_update_multi( name, wksp->page_sz, 1, sub_page_cnt, sub_cpu_idx, S_IRUSR | S_IWUSR ); /* logs details */
8987
} else {
9088
err = fd_shmem_create_multi( name, wksp->page_sz, 1, sub_page_cnt, sub_cpu_idx, S_IRUSR | S_IWUSR ); /* logs details */
9189
}
9290
if( FD_UNLIKELY( err && errno==ENOMEM ) ) return -1;
9391
else if( FD_UNLIKELY( err ) ) FD_LOG_ERR(( "fd_shmem_create_multi failed" ));
9492

95-
void * shmem = fd_shmem_join( name, FD_SHMEM_JOIN_MODE_READ_WRITE, NULL, NULL, NULL, wksp->is_locked ); /* logs details */
93+
void * shmem = fd_shmem_join( name, FD_SHMEM_JOIN_MODE_READ_WRITE, NULL, NULL, NULL ); /* logs details */
9694

9795
void * wkspmem = fd_wksp_new( shmem, name, 0U, wksp->part_max, wksp->total_footprint ); /* logs details */
9896
if( FD_UNLIKELY( !wkspmem ) ) FD_LOG_ERR(( "fd_wksp_new failed" ));
@@ -225,8 +223,6 @@ fd_topo_mlock_max_tile1( fd_topo_t const * topo,
225223
ulong tile_mem = 0UL;
226224

227225
for( ulong i=0UL; i<topo->wksp_cnt; i++ ) {
228-
if( FD_UNLIKELY( !topo->workspaces[ i ].is_locked ) ) continue;
229-
230226
if( FD_UNLIKELY( -1!=tile_needs_wksp( topo, tile, i ) ) )
231227
tile_mem += topo->workspaces[ i ].page_cnt * topo->workspaces[ i ].page_sz;
232228
}
@@ -300,7 +296,6 @@ FD_FN_PURE ulong
300296
fd_topo_mlock( fd_topo_t const * topo ) {
301297
ulong result = 0UL;
302298
for( ulong i=0UL; i<topo->wksp_cnt; i++ ) {
303-
if( FD_UNLIKELY( !topo->workspaces[ i ].is_locked ) ) continue;
304299
result += topo->workspaces[ i ].page_cnt * topo->workspaces[ i ].page_sz;
305300
}
306301
return result;
@@ -390,7 +385,7 @@ fd_topo_print_log( int stdout,
390385

391386
char size[ 24 ];
392387
fd_topo_mem_sz_string( wksp->page_sz * wksp->page_cnt, size );
393-
PRINT( " %2lu (%7s): %12s page_cnt=%3lu page_sz=%-8s numa_idx=%-2lu footprint=%10lu loose=%10lu is_locked=%d\n", i, size, wksp->name, wksp->page_cnt, fd_shmem_page_sz_to_cstr( wksp->page_sz ), wksp->numa_idx, wksp->known_footprint, wksp->total_footprint - wksp->known_footprint, wksp->is_locked );
388+
PRINT( " %2lu (%7s): %12s page_cnt=%3lu page_sz=%-8s numa_idx=%-2lu footprint=%10lu loose=%lu\n", i, size, wksp->name, wksp->page_cnt, fd_shmem_page_sz_to_cstr( wksp->page_sz ), wksp->numa_idx, wksp->known_footprint, wksp->total_footprint - wksp->known_footprint );
394389
}
395390

396391
PRINT( "\nOBJECTS\n" );

0 commit comments

Comments
 (0)