Ignore:
Timestamp:
2012-07-29T17:53:48Z (12 years ago)
Author:
Adam Hraska <adam.hraska+hos@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f0fcb04
Parents:
8e3ed06
Message:

rcu: Switched from using THREAD→nesting_cnt to CPU→nesting_cnt as the main nesting count variable. RCU no longer has to mess with pointers to the corrent nesting_cnt (and gets rid of one level of indirection when accessing the nesting count in reader sections).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/synch/rcu_types.h

    r8e3ed06 r5b03a72  
    6161        rcu_gp_t last_seen_gp;
    6262       
    63         /** Pointer to the currently used nesting count (THREAD's or CPU's). */
    64         size_t *pnesting_cnt;
    65         /** Temporary nesting count if THREAD is NULL, eg in scheduler(). */
    66         size_t tmp_nesting_cnt;
     63        /** The number of times an RCU reader section is nested on this cpu.
     64         *
     65         * If positive, it is definitely executing reader code. If zero,
     66         * the thread might already be executing reader code thanks to
     67         * cpu instruction reordering.
     68         */
     69        size_t nesting_cnt;
    6770
    6871        /** Callbacks to invoke once the current grace period ends, ie cur_cbs_gp.
     
    128131/** RCU related per-thread data. */
    129132typedef struct rcu_thread_data {
    130         /** The number of times an RCU reader section is nested.
    131          *
    132          * If positive, it is definitely executing reader code. If zero,
    133          * the thread might already be executing reader code thanks to
    134          * cpu instruction reordering.
     133        /**
     134         * Nesting count of the thread's RCU read sections when the thread
     135         * is not running.
    135136         */
    136137        size_t nesting_cnt;
Note: See TracChangeset for help on using the changeset viewer.