Changeset 879585a3 in mainline for kernel/generic/include/mm


Ignore:
Timestamp:
2007-03-31T22:22:50Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
31d8e10
Parents:
563c2dd
Message:

Simplify synchronization in as_switch().
The function was oversynchronized, which
was causing deadlocks on the address
space mutex.

Now, address spaces can only be switched
when the asidlock is held. This also protects
stealing of ASIDs. No other synchronization
is necessary.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/mm/as.h

    r563c2dd r879585a3  
    9090                /** Protected by asidlock. */
    9191                link_t inactive_as_with_asid_link;
     92                /**
     93                 * Number of processors on wich is this address space active.
     94                 * Protected by asidlock.
     95                 */
     96                count_t cpu_refcount;
     97                /**
     98                 * Address space identifier.
     99                 * Constant on architectures that do not support ASIDs.
     100                 * Protected by asidlock. 
     101                 */
     102                asid_t asid;
    92103               
    93104                mutex_t lock;
     
    96107                count_t refcount;
    97108               
    98                 /** Number of processors on wich is this address space active. */
    99                 count_t cpu_refcount;
    100                
    101109                /** B+tree of address space areas. */
    102110                btree_t as_area_btree;
    103                
    104                 /**
    105                  *  Address space identifier.
    106                  *  Constant on architectures that do not support ASIDs.
    107                  */
    108                 asid_t asid;
    109111               
    110112                /** Non-generic content. */
     
    134136        /** Protected by asidlock. */
    135137        link_t inactive_as_with_asid_link;
     138        /**
     139         * Number of processors on wich is this address space active.
     140         * Protected by asidlock.
     141         */
     142        count_t cpu_refcount;
     143        /**
     144         * Address space identifier.
     145         * Constant on architectures that do not support ASIDs.
     146         * Protected by asidlock.
     147         */
     148        asid_t asid;
    136149
    137150        mutex_t lock;
     
    140153        count_t refcount;
    141154
    142         /** Number of processors on wich is this address space active. */
    143         count_t cpu_refcount;
    144 
    145155        /** B+tree of address space areas. */
    146156        btree_t as_area_btree;
    147        
    148         /**
    149          *  Address space identifier.
    150          *  Constant on architectures that do not support ASIDs.
    151          */
    152         asid_t asid;
    153157       
    154158        /** Non-generic content. */
     
    250254#endif
    251255
    252 SPINLOCK_EXTERN(inactive_as_with_asid_lock);
    253256extern link_t inactive_as_with_asid_head;
    254257
Note: See TracChangeset for help on using the changeset viewer.