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

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/vm/vm_pagelist.c
          +++ new/usr/src/uts/common/vm/vm_pagelist.c
↓ open down ↓ 1555 lines elided ↑ open up ↑
1556 1556          }
1557 1557  
1558 1558          /*
1559 1559           * Increment page counters
1560 1560           */
1561 1561          page_ctr_add_internal(mnode, mtype, pp, flags);
1562 1562  
1563 1563          /*
1564 1564           * Update cage freemem counter
1565 1565           */
1566      -        atomic_add_long(&kcage_freemem, 1);
     1566 +        atomic_inc_ulong(&kcage_freemem);
1567 1567  }
1568 1568  #else   /* __sparc */
1569 1569  
1570 1570  /* ARGSUSED */
1571 1571  void
1572 1572  page_list_noreloc_startup(page_t *pp)
1573 1573  {
1574 1574          panic("page_list_noreloc_startup: should be here only for sparc");
1575 1575  }
1576 1576  #endif
↓ open down ↓ 2533 lines elided ↑ open up ↑
4110 4110  struct repl_page_stats {
4111 4111          uint_t  ngets;
4112 4112          uint_t  ngets_noreloc;
4113 4113          uint_t  npgr_noreloc;
4114 4114          uint_t  nnopage_first;
4115 4115          uint_t  nnopage;
4116 4116          uint_t  nhashout;
4117 4117          uint_t  nnofree;
4118 4118          uint_t  nnext_pp;
4119 4119  } repl_page_stats;
4120      -#define REPL_STAT_INCR(v)       atomic_add_32(&repl_page_stats.v, 1)
     4120 +#define REPL_STAT_INCR(v)       atomic_inc_32(&repl_page_stats.v)
4121 4121  #else /* REPL_PAGE_STATS */
4122 4122  #define REPL_STAT_INCR(v)
4123 4123  #endif /* REPL_PAGE_STATS */
4124 4124  
4125 4125  int     pgrppgcp;
4126 4126  
4127 4127  /*
4128 4128   * The freemem accounting must be done by the caller.
4129 4129   * First we try to get a replacement page of the same size as like_pp,
4130 4130   * if that is not possible, then we just get a set of discontiguous
↓ open down ↓ 329 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX