Lines Matching full:asb
146 struct aggsum_bucket *asb = &as->as_buckets[i]; in aggsum_value() local
147 if (asb->asc_borrowed == 0) in aggsum_value()
149 mutex_enter(&asb->asc_lock); in aggsum_value()
150 lb += asb->asc_delta + asb->asc_borrowed; in aggsum_value()
151 ub += asb->asc_delta - asb->asc_borrowed; in aggsum_value()
152 asb->asc_delta = 0; in aggsum_value()
153 asb->asc_borrowed = 0; in aggsum_value()
154 mutex_exit(&asb->asc_lock); in aggsum_value()
167 struct aggsum_bucket *asb; in aggsum_add() local
170 asb = &as->as_buckets[(CPU_SEQID_UNSTABLE >> as->as_bucketshift) % in aggsum_add()
174 mutex_enter(&asb->asc_lock); in aggsum_add()
175 if (asb->asc_delta + delta <= (int64_t)asb->asc_borrowed && in aggsum_add()
176 asb->asc_delta + delta >= -(int64_t)asb->asc_borrowed) { in aggsum_add()
177 asb->asc_delta += delta; in aggsum_add()
178 mutex_exit(&asb->asc_lock); in aggsum_add()
181 mutex_exit(&asb->asc_lock); in aggsum_add()
190 if (borrow >= asb->asc_borrowed) in aggsum_add()
191 borrow -= asb->asc_borrowed; in aggsum_add()
193 borrow = (borrow - (int64_t)asb->asc_borrowed) / 4; in aggsum_add()
194 mutex_enter(&asb->asc_lock); in aggsum_add()
195 delta += asb->asc_delta; in aggsum_add()
196 asb->asc_delta = 0; in aggsum_add()
197 asb->asc_borrowed += borrow; in aggsum_add()
198 mutex_exit(&asb->asc_lock); in aggsum_add()
227 struct aggsum_bucket *asb = &as->as_buckets[i]; in aggsum_compare() local
228 if (asb->asc_borrowed == 0) in aggsum_compare()
230 mutex_enter(&asb->asc_lock); in aggsum_compare()
231 lb += asb->asc_delta + asb->asc_borrowed; in aggsum_compare()
232 ub += asb->asc_delta - asb->asc_borrowed; in aggsum_compare()
233 asb->asc_delta = 0; in aggsum_compare()
234 asb->asc_borrowed = 0; in aggsum_compare()
235 mutex_exit(&asb->asc_lock); in aggsum_compare()