Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*


 300         } \
 301 }
 302 
 303 #endif  /* VM_STATS */
 304 
 305 
 306 
 307 #ifdef DEBUG
 308 #define MEMSEG_SEARCH_STATS
 309 #endif
 310 
 311 #ifdef MEMSEG_SEARCH_STATS
 312 struct memseg_stats {
 313     uint_t nsearch;
 314     uint_t nlastwon;
 315     uint_t nhashwon;
 316     uint_t nnotfound;
 317 } memseg_stats;
 318 
 319 #define MEMSEG_STAT_INCR(v) \
 320         atomic_add_32(&memseg_stats.v, 1)
 321 #else
 322 #define MEMSEG_STAT_INCR(x)
 323 #endif
 324 
 325 struct memseg *memsegs;         /* list of memory segments */
 326 
 327 /*
 328  * /etc/system tunable to control large page allocation hueristic.
 329  *
 330  * Setting to LPAP_LOCAL will heavily prefer the local lgroup over remote lgroup
 331  * for large page allocation requests.  If a large page is not readily
 332  * avaliable on the local freelists we will go through additional effort
 333  * to create a large page, potentially moving smaller pages around to coalesce
 334  * larger pages in the local lgroup.
 335  * Default value of LPAP_DEFAULT will go to remote freelists if large pages
 336  * are not readily available in the local lgroup.
 337  */
 338 enum lpap {
 339         LPAP_DEFAULT,   /* default large page allocation policy */
 340         LPAP_LOCAL      /* local large page allocation policy */




 300         } \
 301 }
 302 
 303 #endif  /* VM_STATS */
 304 
 305 
 306 
 307 #ifdef DEBUG
 308 #define MEMSEG_SEARCH_STATS
 309 #endif
 310 
 311 #ifdef MEMSEG_SEARCH_STATS
 312 struct memseg_stats {
 313     uint_t nsearch;
 314     uint_t nlastwon;
 315     uint_t nhashwon;
 316     uint_t nnotfound;
 317 } memseg_stats;
 318 
 319 #define MEMSEG_STAT_INCR(v) \
 320         atomic_inc_32(&memseg_stats.v)
 321 #else
 322 #define MEMSEG_STAT_INCR(x)
 323 #endif
 324 
 325 struct memseg *memsegs;         /* list of memory segments */
 326 
 327 /*
 328  * /etc/system tunable to control large page allocation hueristic.
 329  *
 330  * Setting to LPAP_LOCAL will heavily prefer the local lgroup over remote lgroup
 331  * for large page allocation requests.  If a large page is not readily
 332  * avaliable on the local freelists we will go through additional effort
 333  * to create a large page, potentially moving smaller pages around to coalesce
 334  * larger pages in the local lgroup.
 335  * Default value of LPAP_DEFAULT will go to remote freelists if large pages
 336  * are not readily available in the local lgroup.
 337  */
 338 enum lpap {
 339         LPAP_DEFAULT,   /* default large page allocation policy */
 340         LPAP_LOCAL      /* local large page allocation policy */