Ignore:
Timestamp:
Apr 19, 2022, 3:00:04 PM (3 years ago)
Author:
m3zulfiq <m3zulfiq@…>
Branches:
ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
Children:
5b84a321
Parents:
ba897d21 (diff), bb7c77d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

added benchmark and evaluations chapter to thesis

File:
1 edited

Legend:

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

    rba897d21 r2e9b59b  
    3232
    3333        void __cfa_io_start( processor * proc ) {}
    34         bool __cfa_io_flush( processor * proc, int ) { return false; }
     34        bool __cfa_io_flush( processor * proc ) { return false; }
     35        bool __cfa_io_drain( processor * proc ) __attribute__((nonnull (1))) { return false; }
     36        void __cfa_io_idle ( processor * ) __attribute__((nonnull (1))) {}
    3537        void __cfa_io_stop ( processor * proc ) {}
    3638
     
    3941
    4042#else
     43#pragma GCC diagnostic push
     44#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
    4145        #include <errno.h>
    4246        #include <stdint.h>
     
    5761        #include "bitmanip.hfa"
    5862        #include "fstream.hfa"
    59         #include "kernel_private.hfa"
     63        #include "kernel/private.hfa"
     64        #include "limits.hfa"
    6065        #include "thread.hfa"
     66#pragma GCC diagnostic pop
    6167
    6268        void ?{}(io_context_params & this) {
     
    112118                this.ext_sq.empty = true;
    113119                (this.ext_sq.queue){};
    114                 __io_uring_setup( this, cl.io.params, proc->idle_fd );
     120                __io_uring_setup( this, cl.io.params, proc->idle_wctx.evfd );
    115121                __cfadbg_print_safe(io_core, "Kernel I/O : Created ring for io_context %u (%p)\n", this.fd, &this);
    116122        }
     
    122128                __cfadbg_print_safe(io_core, "Kernel I/O : Destroyed ring for io_context %u\n", this.fd);
    123129        }
    124 
    125         extern void __disable_interrupts_hard();
    126         extern void __enable_interrupts_hard();
    127130
    128131        static void __io_uring_setup( $io_context & this, const io_context_params & params_in, int procfd ) {
     
    214217
    215218                // completion queue
     219                cq.lock      = false;
     220                cq.id        = MAX;
     221                cq.ts        = rdtscl();
    216222                cq.head      = (volatile __u32 *)(((intptr_t)cq.ring_ptr) + params.cq_off.head);
    217223                cq.tail      = (volatile __u32 *)(((intptr_t)cq.ring_ptr) + params.cq_off.tail);
     
    227233                        __cfadbg_print_safe(io_core, "Kernel I/O : registering %d for completion with ring %d\n", procfd, fd);
    228234
    229                         __disable_interrupts_hard();
    230 
    231235                        int ret = syscall( __NR_io_uring_register, fd, IORING_REGISTER_EVENTFD, &procfd, 1);
    232236                        if (ret < 0) {
    233237                                abort("KERNEL ERROR: IO_URING EVENTFD REGISTER - %s\n", strerror(errno));
    234238                        }
    235 
    236                         __enable_interrupts_hard();
    237239
    238240                        __cfadbg_print_safe(io_core, "Kernel I/O : registered %d for completion with ring %d\n", procfd, fd);
Note: See TracChangeset for help on using the changeset viewer.