Re: svn commit: r333052 - head/sys/vm
On Fri, Apr 27, 2018 at 4:29 PM, Rodney W. Grimes < free...@pdx.rh.cn85.dnsmgr.net> wrote: > [ Charset UTF-8 unsupported, converting... ] > > Author: mjg > > Date: Fri Apr 27 05:37:35 2018 > > New Revision: 333052 > > URL: https://svnweb.freebsd.org/changeset/base/333052 > > > > Log: > > uma: whack main zone counter update in the slow path > > Remove might be a better word, whack is ambigous in this context. > > Ok. > > Cached counters are typically zero at this point so it performs > > avoidable atomics. Everything reading them also reads the cached > > ones, thus there is really no point. > > No point in? reading them, writting them, updating them? > No point in doing the update, hence the removal. > > > > > Reviewed by:jeff > > > > Modified: > > head/sys/vm/uma_core.c > > > > Modified: head/sys/vm/uma_core.c > > > == > > --- head/sys/vm/uma_core.cFri Apr 27 05:36:02 2018(r333051) > > +++ head/sys/vm/uma_core.cFri Apr 27 05:37:35 2018(r333052) > > @@ -2329,14 +2329,6 @@ zalloc_start: > > cpu = curcpu; > > cache = &zone->uz_cpu[cpu]; > > > > - /* > > - * Since we have locked the zone we may as well send back our > stats. > > - */ > > - atomic_add_long(&zone->uz_allocs, cache->uc_allocs); > > - atomic_add_long(&zone->uz_frees, cache->uc_frees); > > - cache->uc_allocs = 0; > > - cache->uc_frees = 0; > > - > > /* See if we lost the race to fill the cache. */ > > if (cache->uc_allocbucket != NULL) { > > ZONE_UNLOCK(zone); > > > > > > -- > Rod Grimes > rgri...@freebsd.org > -- Mateusz Guzik ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r333052 - head/sys/vm
[ Charset UTF-8 unsupported, converting... ] > Author: mjg > Date: Fri Apr 27 05:37:35 2018 > New Revision: 333052 > URL: https://svnweb.freebsd.org/changeset/base/333052 > > Log: > uma: whack main zone counter update in the slow path Remove might be a better word, whack is ambigous in this context. > Cached counters are typically zero at this point so it performs > avoidable atomics. Everything reading them also reads the cached > ones, thus there is really no point. No point in? reading them, writting them, updating them? > > Reviewed by:jeff > > Modified: > head/sys/vm/uma_core.c > > Modified: head/sys/vm/uma_core.c > == > --- head/sys/vm/uma_core.cFri Apr 27 05:36:02 2018(r333051) > +++ head/sys/vm/uma_core.cFri Apr 27 05:37:35 2018(r333052) > @@ -2329,14 +2329,6 @@ zalloc_start: > cpu = curcpu; > cache = &zone->uz_cpu[cpu]; > > - /* > - * Since we have locked the zone we may as well send back our stats. > - */ > - atomic_add_long(&zone->uz_allocs, cache->uc_allocs); > - atomic_add_long(&zone->uz_frees, cache->uc_frees); > - cache->uc_allocs = 0; > - cache->uc_frees = 0; > - > /* See if we lost the race to fill the cache. */ > if (cache->uc_allocbucket != NULL) { > ZONE_UNLOCK(zone); > > -- Rod Grimes rgri...@freebsd.org ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r333052 - head/sys/vm
Author: mjg Date: Fri Apr 27 05:37:35 2018 New Revision: 333052 URL: https://svnweb.freebsd.org/changeset/base/333052 Log: uma: whack main zone counter update in the slow path Cached counters are typically zero at this point so it performs avoidable atomics. Everything reading them also reads the cached ones, thus there is really no point. Reviewed by: jeff Modified: head/sys/vm/uma_core.c Modified: head/sys/vm/uma_core.c == --- head/sys/vm/uma_core.c Fri Apr 27 05:36:02 2018(r333051) +++ head/sys/vm/uma_core.c Fri Apr 27 05:37:35 2018(r333052) @@ -2329,14 +2329,6 @@ zalloc_start: cpu = curcpu; cache = &zone->uz_cpu[cpu]; - /* -* Since we have locked the zone we may as well send back our stats. -*/ - atomic_add_long(&zone->uz_allocs, cache->uc_allocs); - atomic_add_long(&zone->uz_frees, cache->uc_frees); - cache->uc_allocs = 0; - cache->uc_frees = 0; - /* See if we lost the race to fill the cache. */ if (cache->uc_allocbucket != NULL) { ZONE_UNLOCK(zone); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"