Changeset 1e6ffb44


Ignore:
Timestamp:
Mar 28, 2022, 5:55:48 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
ff55092
Parents:
7425720
Message:

Changed debug prints to help debug helping

File:
1 edited

Legend:

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

    r7425720 r1e6ffb44  
    169169
    170170                        struct io_future_t * future = (struct io_future_t *)(uintptr_t)cqe.user_data;
    171                         __cfadbg_print_safe( io, "Kernel I/O : Syscall completed : cqe %p, result %d for %p\n", &cqe, cqe.res, future );
     171                        // __cfadbg_print_safe( io, "Kernel I/O : Syscall completed : cqe %p, result %d for %p\n", &cqe, cqe.res, future );
    172172
    173173                        __kernel_unpark( fulfil( *future, cqe.res, false ), UNPARK_LOCAL );
    174174                }
    175175
    176                 __cfadbg_print_safe(io, "Kernel I/O : %u completed\n", count);
    177176                unsigned long long ts_next = ctx->cq.ts = rdtscl();
    178177
     
    181180                __atomic_store_n( ctx->cq.head, head + count, __ATOMIC_SEQ_CST );
    182181
     182                __cfadbg_print_safe(io, "Kernel I/O : %u completed age %llu\n", count, ts_next);
    183183                /* paranoid */ verify( ready_schedule_islocked() );
    184184                /* paranoid */ verify( ! __preemption_enabled() );
     
    230230                                        const unsigned long long cutoff = calc_cutoff(ctsc, ctx->cq.id, ctxs_count, io.data, io.tscs, __shard_factor.io);
    231231                                        const unsigned long long age = moving_average(ctsc, io.tscs[target].tv, io.tscs[target].ma);
    232                                         // __cfadbg_print_safe(ready_queue, "Kernel : Help attempt on %u from %u, age %'llu vs cutoff %'llu, %s\n", target, this, age, cutoff, age > cutoff ? "yes" : "no");
     232                                        __cfadbg_print_safe(io, "Kernel I/O: Help attempt on %u from %u, age %'llu vs cutoff %'llu, %s\n", target, this, age, cutoff, age > cutoff ? "yes" : "no");
    233233                                        if(age <= cutoff) break HELP;
    234234
     
    301301                struct io_uring_sqe * sqes = ctx->sq.sqes;
    302302                for(i; want) {
    303                         __cfadbg_print_safe(io, "Kernel I/O : filling loop\n");
     303                        // __cfadbg_print_safe(io, "Kernel I/O : filling loop\n");
    304304                        out_sqes[i] = &sqes[idxs[i]];
    305305                }
     
    319319                // copy all the indexes we want from the available list
    320320                for(i; want) {
    321                         __cfadbg_print_safe(io, "Kernel I/O : allocating loop\n");
     321                        // __cfadbg_print_safe(io, "Kernel I/O : allocating loop\n");
    322322                        idxs[i] = sq.free_ring.array[(fhead + i) & mask];
    323323                }
     
    336336        // sqe == &sqes[idx]
    337337        struct $io_context * cfa_io_allocate(struct io_uring_sqe * sqes[], __u32 idxs[], __u32 want) {
    338                 __cfadbg_print_safe(io, "Kernel I/O : attempting to allocate %u\n", want);
     338                // __cfadbg_print_safe(io, "Kernel I/O : attempting to allocate %u\n", want);
    339339
    340340                disable_interrupts();
     
    344344                /* paranoid */ verify( ctx );
    345345
    346                 __cfadbg_print_safe(io, "Kernel I/O : attempting to fast allocation\n");
     346                // __cfadbg_print_safe(io, "Kernel I/O : attempting to fast allocation\n");
    347347
    348348                // We can proceed to the fast path
     
    352352                        enable_interrupts();
    353353
    354                         __cfadbg_print_safe(io, "Kernel I/O : fast allocation successful from ring %d\n", ctx->fd);
     354                        // __cfadbg_print_safe(io, "Kernel I/O : fast allocation successful from ring %d\n", ctx->fd);
    355355
    356356                        __fill( sqes, want, idxs, ctx );
     
    367367                /* paranoid */ verify( ioarb );
    368368
    369                 __cfadbg_print_safe(io, "Kernel I/O : falling back on arbiter for allocation\n");
     369                // __cfadbg_print_safe(io, "Kernel I/O : falling back on arbiter for allocation\n");
    370370
    371371                struct $io_context * ret = __ioarbiter_allocate(*ioarb, idxs, want);
    372372
    373                 __cfadbg_print_safe(io, "Kernel I/O : slow allocation completed from ring %d\n", ret->fd);
     373                // __cfadbg_print_safe(io, "Kernel I/O : slow allocation completed from ring %d\n", ret->fd);
    374374
    375375                __fill( sqes, want, idxs,ret );
     
    388388                // Add the sqes to the array
    389389                for( i; have ) {
    390                         __cfadbg_print_safe(io, "Kernel I/O : __submit loop\n");
     390                        // __cfadbg_print_safe(io, "Kernel I/O : __submit loop\n");
    391391                        sq.kring.array[ (tail + i) & mask ] = idxs[i];
    392392                }
     
    415415
    416416        void cfa_io_submit( struct $io_context * inctx, __u32 idxs[], __u32 have, bool lazy ) __attribute__((nonnull (1))) {
    417                 __cfadbg_print_safe(io, "Kernel I/O : attempting to submit %u (%s)\n", have, lazy ? "lazy" : "eager");
     417                // __cfadbg_print_safe(io, "Kernel I/O : attempting to submit %u (%s)\n", have, lazy ? "lazy" : "eager");
    418418
    419419                disable_interrupts();
     
    432432                        enable_interrupts();
    433433
    434                         __cfadbg_print_safe(io, "Kernel I/O : submitted on fast path\n");
     434                        // __cfadbg_print_safe(io, "Kernel I/O : submitted on fast path\n");
    435435                        return;
    436436                }
     
    440440                enable_interrupts();
    441441
    442                 __cfadbg_print_safe(io, "Kernel I/O : falling back on arbiter for submission\n");
     442                // __cfadbg_print_safe(io, "Kernel I/O : falling back on arbiter for submission\n");
    443443
    444444                __ioarbiter_submit(inctx, idxs, have, lazy);
     
    484484                // go through the range and release the sqes
    485485                for( i; count ) {
    486                         __cfadbg_print_safe(io, "Kernel I/O : release loop\n");
     486                        // __cfadbg_print_safe(io, "Kernel I/O : release loop\n");
    487487                        __u32 idx = ctx.sq.kring.array[ (phead + i) & mask ];
    488488                        ctx.sq.free_ring.array[ (ftail + i) & mask ] = idx;
     
    524524
    525525        static $io_context * __ioarbiter_allocate( $io_arbiter & this, __u32 idxs[], __u32 want ) {
    526                 __cfadbg_print_safe(io, "Kernel I/O : arbiter allocating\n");
     526                // __cfadbg_print_safe(io, "Kernel I/O : arbiter allocating\n");
    527527
    528528                __STATS__( false, io.alloc.block += 1; )
Note: See TracChangeset for help on using the changeset viewer.