Skip to content

Commit cebe940

Browse files
riptlyhzhangjump
authored andcommitted
topo: permit unused links
1 parent 5272011 commit cebe940

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/disco/topo/fd_topo.h

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ typedef struct {
7373
fd_frag_meta_t * mcache; /* The mcache of this link. */
7474
void * dcache; /* The dcache of this link, if it has one. */
7575
};
76+
77+
uint permit_unused : 1; /* Permit a topology where this link has no consumers */
7678
} fd_topo_link_t;
7779

7880
/* A tile is a unique process that is spawned by Firedancer to represent
@@ -883,12 +885,6 @@ fd_topo_huge_page_cnt( fd_topo_t const * topo,
883885
ulong numa_idx,
884886
int include_anonymous );
885887

886-
/* Check all invariants of the given topology to make sure it is valid.
887-
An invalid topology will cause the program to abort with an error
888-
message. */
889-
void
890-
fd_topo_validate( fd_topo_t const * topo );
891-
892888
/* Prints a message describing the topology to an output stream. If
893889
stdout is true, will be written to stdout, otherwise will be written
894890
as a NOTICE log message to the log file. */

src/disco/topo/fd_topob.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,9 @@ validate( fd_topo_t const * topo ) {
323323
/* Each link has at least one consumer */
324324
for( ulong i=0UL; i<topo->link_cnt; i++ ) {
325325
ulong cnt = fd_topo_link_consumer_cnt( topo, &topo->links[ i ] );
326-
if( FD_UNLIKELY( cnt < 1 ) )
326+
if( FD_UNLIKELY( cnt < 1 && !topo->links[ i ].permit_unused ) ) {
327327
FD_LOG_ERR(( "link %lu (%s:%lu) has 0 consumers", i, topo->links[ i ].name, topo->links[ i ].kind_id ));
328+
}
328329
}
329330
}
330331

0 commit comments

Comments
 (0)