Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*
*** 1424,1437 ****
*/
if (listener->tcp_listen_cnt != NULL) {
tcp_listen_cnt_t *tlc = listener->tcp_listen_cnt;
int64_t now;
! if (atomic_add_32_nv(&tlc->tlc_cnt, 1) > tlc->tlc_max + 1) {
mutex_exit(&listener->tcp_eager_lock);
now = ddi_get_lbolt64();
! atomic_add_32(&tlc->tlc_cnt, -1);
TCP_STAT(tcps, tcp_listen_cnt_drop);
tlc->tlc_drop++;
if (now - tlc->tlc_report_time >
MSEC_TO_TICK(TCP_TLC_REPORT_INTERVAL)) {
zcmn_err(lconnp->conn_zoneid, CE_WARN,
--- 1424,1437 ----
*/
if (listener->tcp_listen_cnt != NULL) {
tcp_listen_cnt_t *tlc = listener->tcp_listen_cnt;
int64_t now;
! if (atomic_inc_32_nv(&tlc->tlc_cnt) > tlc->tlc_max + 1) {
mutex_exit(&listener->tcp_eager_lock);
now = ddi_get_lbolt64();
! atomic_dec_32(&tlc->tlc_cnt);
TCP_STAT(tcps, tcp_listen_cnt_drop);
tlc->tlc_drop++;
if (now - tlc->tlc_report_time >
MSEC_TO_TICK(TCP_TLC_REPORT_INTERVAL)) {
zcmn_err(lconnp->conn_zoneid, CE_WARN,
*** 1869,1879 ****
error3:
CONN_DEC_REF(econnp);
error2:
freemsg(mp);
if (tlc_set)
! atomic_add_32(&listener->tcp_listen_cnt->tlc_cnt, -1);
}
/*
* In an ideal case of vertical partition in NUMA architecture, its
* beneficial to have the listener and all the incoming connections
--- 1869,1879 ----
error3:
CONN_DEC_REF(econnp);
error2:
freemsg(mp);
if (tlc_set)
! atomic_dec_32(&listener->tcp_listen_cnt->tlc_cnt);
}
/*
* In an ideal case of vertical partition in NUMA architecture, its
* beneficial to have the listener and all the incoming connections