Changes in / [98d1b90:41d3c8d]
- Files:
-
- 4 edited
-
Jenkinsfile (modified) (6 diffs)
-
libcfa/src/concurrency/kernel.hfa (modified) (4 diffs)
-
libcfa/src/concurrency/kernel/cluster.cfa (modified) (5 diffs)
-
libcfa/src/concurrency/kernel/cluster.hfa (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r98d1b90 r41d3c8d 108 108 109 109 // Configure libcfa 110 sh 'make -j $(nproc)--no-print-directory configure-libcfa'110 sh 'make -j 8 --no-print-directory configure-libcfa' 111 111 } 112 112 } … … 116 116 dir (BuildDir) { 117 117 // Build driver 118 sh 'make -j $(nproc)--no-print-directory -C driver'118 sh 'make -j 8 --no-print-directory -C driver' 119 119 120 120 // Build translator 121 sh 'make -j $(nproc)--no-print-directory -C src'121 sh 'make -j 8 --no-print-directory -C src' 122 122 } 123 123 } … … 126 126 // Build outside of the src tree to ease cleaning 127 127 dir (BuildDir) { 128 sh "make -j $(nproc)--no-print-directory -C libcfa/${Settings.Architecture.name}-debug"128 sh "make -j 8 --no-print-directory -C libcfa/${Settings.Architecture.name}-debug" 129 129 } 130 130 } … … 133 133 // Build outside of the src tree to ease cleaning 134 134 dir (BuildDir) { 135 sh "make -j $(nproc)--no-print-directory -C libcfa/${Settings.Architecture.name}-nodebug"135 sh "make -j 8 --no-print-directory -C libcfa/${Settings.Architecture.name}-nodebug" 136 136 } 137 137 } … … 140 140 // Build outside of the src tree to ease cleaning 141 141 dir (BuildDir) { 142 sh "make -j $(nproc)--no-print-directory install"142 sh "make -j 8 --no-print-directory install" 143 143 } 144 144 } … … 161 161 Tools.BuildStage('Test: full', Settings.RunAllTests) { 162 162 dir (BuildDir) { 163 jopt = " -j $(nproc)"163 jopt = "" 164 164 if( Settings.Architecture.node == 'x86' ) { 165 165 jopt = "-j2" -
libcfa/src/concurrency/kernel.hfa
r98d1b90 r41d3c8d 108 108 struct { 109 109 $io_context * ctx; 110 unsigned id;111 unsigned target;112 110 volatile bool pending; 113 111 volatile bool dirty; … … 211 209 struct { 212 210 // Arary of subqueues 213 __intrusive_lane_t *data;211 __intrusive_lane_t * volatile data; 214 212 215 213 // Time since subqueues were processed 216 __timestamp_t * tscs;214 __timestamp_t * volatile tscs; 217 215 218 216 // Number of subqueue / timestamps … … 221 219 222 220 struct { 223 // Array of $io_224 $io_context ** data;225 226 221 // Time since subqueues were processed 227 __timestamp_t * tscs;222 __timestamp_t * volatile tscs; 228 223 229 224 // Number of I/O subqueues … … 232 227 233 228 // Cache each kernel thread belongs to 234 __cache_id_t * caches;229 __cache_id_t * volatile caches; 235 230 } sched; 236 231 -
libcfa/src/concurrency/kernel/cluster.cfa
r98d1b90 r41d3c8d 253 253 } 254 254 255 static void assign_list(unsigned & val rq, unsigned & valio, dlist(processor) & list, unsigned count) {255 static void assign_list(unsigned & value, dlist(processor) & list, unsigned count) { 256 256 processor * it = &list`first; 257 257 for(unsigned i = 0; i < count; i++) { 258 258 /* paranoid */ verifyf( it, "Unexpected null iterator, at index %u of %u\n", i, count); 259 it->rdq.id = val rq;259 it->rdq.id = value; 260 260 it->rdq.target = MAX; 261 it->io.id = valio; 262 it->io.target = MAX; 263 valrq += __shard_factor.readyq; 264 valio += __shard_factor.io; 261 value += __shard_factor.readyq; 265 262 it = &(*it)`next; 266 263 } … … 268 265 269 266 static void reassign_cltr_id(struct cluster * cltr) { 270 unsigned prefrq = 0; 271 unsigned prefio = 0; 272 assign_list(prefrq, prefio, cltr->procs.actives, cltr->procs.total - cltr->procs.idle); 273 assign_list(prefrq, prefio, cltr->procs.idles , cltr->procs.idle ); 274 } 275 276 static void assign_io($io_context ** data, size_t count, dlist(processor) & list) { 277 processor * it = &list`first; 278 while(it) { 279 /* paranoid */ verifyf( it, "Unexpected null iterator\n"); 280 /* paranoid */ verifyf( it->io.id < count, "Processor %p has id %u above count %zu\n", it, it->rdq.id, count); 281 data[it->io.id] = it->io.ctx; 282 it = &(*it)`next; 283 } 284 } 285 286 static void reassign_cltr_io(struct cluster * cltr) { 287 assign_io(cltr->sched.io.data, cltr->sched.io.count, cltr->procs.actives); 288 assign_io(cltr->sched.io.data, cltr->sched.io.count, cltr->procs.idles ); 267 unsigned preferred = 0; 268 assign_list(preferred, cltr->procs.actives, cltr->procs.total - cltr->procs.idle); 269 assign_list(preferred, cltr->procs.idles , cltr->procs.idle ); 289 270 } 290 271 … … 341 322 342 323 // Fix the io times 343 cltr->sched.io.count = target * __shard_factor.io;324 cltr->sched.io.count = target; 344 325 fix_times(cltr->sched.io.tscs, cltr->sched.io.count); 345 326 … … 349 330 // reassign the clusters. 350 331 reassign_cltr_id(cltr); 351 352 cltr->sched.io.data = alloc( cltr->sched.io.count, cltr->sched.io.data`realloc );353 reassign_cltr_io(cltr);354 332 355 333 // Make sure that everything is consistent … … 433 411 434 412 // Fix the io times 435 cltr->sched.io.count = target * __shard_factor.io;413 cltr->sched.io.count = target; 436 414 fix_times(cltr->sched.io.tscs, cltr->sched.io.count); 437 415 438 416 reassign_cltr_id(cltr); 439 440 cltr->sched.io.data = alloc( cltr->sched.io.count, cltr->sched.io.data`realloc );441 reassign_cltr_io(cltr);442 417 443 418 // Make sure that everything is consistent -
libcfa/src/concurrency/kernel/cluster.hfa
r98d1b90 r41d3c8d 72 72 static struct { 73 73 const unsigned readyq; 74 const unsigned io; 75 } __shard_factor = { 2, 1 }; 74 } __shard_factor = { 2 }; 76 75 77 76 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.