Changes between Version 14 and Version 15 of kernel_synchro


Ignore:
Timestamp:
Sep 11, 2020, 4:41:26 PM (4 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • kernel_synchro

    v14 v15  
    5454== F) Locks debug  ==
    5555
    56 Each busylock (remote or local) contains a "type" field defining the specific resource protected by this lock, that is a non-zero value defined at lock initialization.
     56Each local or remote busylock contains a <type> field defining the specific resource protected by this lock, that is a non-zero value defined at lock initialization.
     57 * if the ''busylock'' is directly used to protect access to a shared kernel structure, this type field defines the type of the protected structure.
     58 * if the ''busylock'' is used to protect concurrent access to an higher level lock (queuelock or rwlock), the <type> field define the type of the structure protected by the higher level lock.
     59The exiting lock types are defined in the <kernel_config.h> file.
    5760
    58 When the DEBUG_BUSYLOCK parameter is set to a non-zero value (in the kernel_config.h file), two optional debug mechanism are activated, thanks to conditional compilation.
     61=== F.1 busylock debug ===
     62
     63When the DEBUG_BUSYLOCK parameter is set to a non-zero value in the <kernel_config.h> file, two debug mechanism are activated, thanks to conditional compilation.
    5964
    60651. Each thread contains - besides the ''busylocks'' counter - an optional ''busylocks_root'' field, that is the root of an embedded xlist of (local or remote) busylocks hold by a given thread at a given time. This list is implemented by an optional ''xlist'' field in the busy lock descriptor. It  is dynamically updated by the ''busylock_acquire()'' and ''busylock_release()'' functions. The set of taken busylocks is printed in the error message, when the scheduler detects that a descheduling thread is holding one or several busylocks. This list can also be printed through the ''idbg'' interactive debugger, for any thread identified by its (pid,trdid).
    6166
    62 2. Moreover, when DEBUG_BUSYLOCK  is set,  all busylock_acquire() / busylock_release() made by the thread, identified by the DEBUG_BUSYLOCK_PID and DEBUG_BUSYLOCK_TRDID parameters are traced on kernel TXT0. 
     672. Moreover, when DEBUG_BUSYLOCK  is set,  all busylock_acquire() / busylock_release() made by the thread, identified by the DEBUG_BUSYLOCK_PID and DEBUG_BUSYLOCK_TRDID parameters (defined in the kernel_config.h file) are traced on kernel TXT0. 
    6368
     69=== F.2 higher level lock debug ===
    6470
    65  
     71When the DEBUG_QUEUELOCK parameter is set,  all ''queuelock_acquire() / queuelock_release()'' made by any thread on a given ''queuelock''  identified by  its (cxy,ptr) are traced on the kernel TXT0 terminal. The DEBUG_QUEUELOCK, DEBUG_QUEUELOCK_CXY (cluster identifier) and DEBUG_QUEUELOCK_PTR (queuelock local pointer) parameters are defined in the <kernel_config.h> file.
     72
     73When the DEBUG_RWLOCK parameter is set,  all ''rwlock_acquire() / rwlock_release()'' made by any thread on a given ''rwlock''  identified by  its (cxy,ptr) are traced on the kernel TXT0 terminal. The DEBUG_RWLOCK, DEBUG_RWLOCK_CXY (cluster identifier) and DEBUG_RWLOCK_PTR (rwlock local pointer) parameters are defined in the <kernel_config.h> file.