Changeset 1a567d0 for libcfa/src/concurrency
- Timestamp:
- Mar 23, 2022, 1:22:31 PM (3 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- 3caf5e3
- Parents:
- 4479890
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/cluster.cfa
r4479890 r1a567d0 260 260 it->rdq.id = valrq; 261 261 it->rdq.target = MAX; 262 it->io.ctx->cq.id = valio;263 it->io.target = MAX;264 262 valrq += __shard_factor.readyq; 265 valio += __shard_factor.io; 263 #if defined(CFA_HAVE_LINUX_IO_URING_H) 264 it->io.ctx->cq.id = valio; 265 it->io.target = MAX; 266 valio += __shard_factor.io; 267 #endif 266 268 it = &(*it)`next; 267 269 } … … 275 277 } 276 278 277 static void assign_io($io_context ** data, size_t count, dlist(processor) & list) { 278 processor * it = &list`first; 279 while(it) { 280 /* paranoid */ verifyf( it, "Unexpected null iterator\n"); 281 /* paranoid */ verifyf( it->io.ctx->cq.id < count, "Processor %p has id %u above count %zu\n", it, it->rdq.id, count); 282 data[it->io.ctx->cq.id] = it->io.ctx; 283 it = &(*it)`next; 284 } 285 } 286 287 static void reassign_cltr_io(struct cluster * cltr) { 288 assign_io(cltr->sched.io.data, cltr->sched.io.count, cltr->procs.actives); 289 assign_io(cltr->sched.io.data, cltr->sched.io.count, cltr->procs.idles ); 290 } 279 #if defined(CFA_HAVE_LINUX_IO_URING_H) 280 static void assign_io($io_context ** data, size_t count, dlist(processor) & list) { 281 processor * it = &list`first; 282 while(it) { 283 /* paranoid */ verifyf( it, "Unexpected null iterator\n"); 284 /* paranoid */ verifyf( it->io.ctx->cq.id < count, "Processor %p has id %u above count %zu\n", it, it->rdq.id, count); 285 data[it->io.ctx->cq.id] = it->io.ctx; 286 it = &(*it)`next; 287 } 288 } 289 290 static void reassign_cltr_io(struct cluster * cltr) { 291 assign_io(cltr->sched.io.data, cltr->sched.io.count, cltr->procs.actives); 292 assign_io(cltr->sched.io.data, cltr->sched.io.count, cltr->procs.idles ); 293 } 294 #else 295 static void reassign_cltr_io(struct cluster *) {} 296 #endif 291 297 292 298 static void fix_times( __timestamp_t * volatile & tscs, unsigned count ) {
Note: See TracChangeset
for help on using the changeset viewer.