Ignore:
Timestamp:
May 8, 2020, 2:42:15 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
6c12fd2
Parents:
0335620
Message:

Added option to change the length of the array of ready sqe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/io.cfa

    r0335620 rdd4e2d7  
    2020
    2121#if !defined(HAVE_LINUX_IO_URING_H)
    22         void __kernel_io_startup( cluster &, int, bool ) {
     22        void __kernel_io_startup( cluster &, unsigned, bool ) {
    2323                // Nothing to do without io_uring
    2424        }
     
    205205// I/O Startup / Shutdown logic
    206206//=============================================================================================
    207         void __kernel_io_startup( cluster & this, int io_flags, bool main_cluster ) {
     207        void __kernel_io_startup( cluster & this, unsigned io_flags, bool main_cluster ) {
    208208                this.io = malloc();
    209209
     
    280280
    281281                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);
    283283                        sq.ready = alloc_align( 64, sq.ready_cnt );
    284284                        for(i; sq.ready_cnt) {
     
    753753                                __atomic_fetch_add( &ring.submit_q.stats.look_avg.cnt,   1,     __ATOMIC_RELAXED );
    754754                        #endif
     755
     756                        __cfadbg_print_safe( io, "Kernel I/O : Added %u to ready for %p\n", idx, active_thread() );
    755757                }
    756758                else {
     
    781783
    782784                        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                }
    787788        }
    788789
Note: See TracChangeset for help on using the changeset viewer.