Changeset dd4e2d7 for libcfa/src/concurrency/io.cfa
- Timestamp:
- May 8, 2020, 2:42:15 PM (3 years ago)
- Branches:
- arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 6c12fd2
- Parents:
- 0335620
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/io.cfa
r0335620 rdd4e2d7 20 20 21 21 #if !defined(HAVE_LINUX_IO_URING_H) 22 void __kernel_io_startup( cluster &, int, bool ) {22 void __kernel_io_startup( cluster &, unsigned, bool ) { 23 23 // Nothing to do without io_uring 24 24 } … … 205 205 // I/O Startup / Shutdown logic 206 206 //============================================================================================= 207 void __kernel_io_startup( cluster & this, intio_flags, bool main_cluster ) {207 void __kernel_io_startup( cluster & this, unsigned io_flags, bool main_cluster ) { 208 208 this.io = malloc(); 209 209 … … 280 280 281 281 if( io_flags & CFA_CLUSTER_IO_POLLER_THREAD_SUBMITS ) { 282 sq.ready_cnt = 32;282 sq.ready_cnt = max(io_flags >> CFA_CLUSTER_IO_BUFFLEN_OFFSET, 8); 283 283 sq.ready = alloc_align( 64, sq.ready_cnt ); 284 284 for(i; sq.ready_cnt) { … … 753 753 __atomic_fetch_add( &ring.submit_q.stats.look_avg.cnt, 1, __ATOMIC_RELAXED ); 754 754 #endif 755 756 __cfadbg_print_safe( io, "Kernel I/O : Added %u to ready for %p\n", idx, active_thread() ); 755 757 } 756 758 else { … … 781 783 782 784 unlock(ring.submit_q.lock); 783 } 784 // Make sure that idx was submitted 785 // Be careful to not get false positive if we cycled the entire list or that someone else submitted for us 786 __cfadbg_print_safe( io, "Kernel I/O : Performed io_submit for %p, returned %d\n", active_thread(), ret ); 785 786 __cfadbg_print_safe( io, "Kernel I/O : Performed io_submit for %p, returned %d\n", active_thread(), ret ); 787 } 787 788 } 788 789
Note: See TracChangeset
for help on using the changeset viewer.