Changeset 2432e8e


Ignore:
Timestamp:
Mar 2, 2022, 2:07:45 PM (2 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
Children:
ced2e855
Parents:
028404f
Message:

Fixed deadlock on io slowpath due to spin lock recursion.

File:
1 edited

Legend:

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

    r028404f r2432e8e  
    287287        //=============================================================================================
    288288        // submission
    289         static inline void __submit( struct $io_context * ctx, __u32 idxs[], __u32 have, bool lazy) {
     289        static inline void __submit_only( struct $io_context * ctx, __u32 idxs[], __u32 have) {
    290290                // We can proceed to the fast path
    291291                // Get the right objects
     
    306306                ctx->proc->io.pending = true;
    307307                ctx->proc->io.dirty   = true;
     308        }
     309
     310        static inline void __submit( struct $io_context * ctx, __u32 idxs[], __u32 have, bool lazy) {
     311                __sub_ring_t & sq = ctx->sq;
     312                __submit_only(ctx, idxs, have);
     313
    308314                if(sq.to_submit > 30) {
    309315                        __tls_stats()->io.flush.full++;
     
    501507                                        __external_io & ei = (__external_io&)drop( ctx.ext_sq.queue );
    502508
    503                                         __submit(&ctx, ei.idxs, ei.have, ei.lazy);
     509                                        __submit_only(&ctx, ei.idxs, ei.have);
    504510
    505511                                        post( ei.sem );
Note: See TracChangeset for help on using the changeset viewer.