svn commit: r336231 - head/sys/vm

Mateusz Guzik mjguzik at gmail.com
Fri Jul 13 04:29:34 UTC 2018


they are modified in 2 places: zone_alloc_item and zone_free_item. this
should probably get fixed up at some point, but I have no interest in
working on it.

On Fri, Jul 13, 2018 at 5:39 AM, Mark Johnston <markj at freebsd.org> wrote:

> On Fri, Jul 13, 2018 at 01:41:46AM +0200, Mateusz Guzik wrote:
> > uma_zone_get_cur iterates the per-cpu stats and looks at the zone-global
> > stats. The patch only gets rid of rolling them up, thus there is no
> > difference from the pov of this func.
> > I don't follow the remark about uma_reclaim.
>
> I'm pointing out that with this change we no longer maintain any
> zone-global stats.
>
> > On Fri, Jul 13, 2018 at 12:58 AM, Mark Johnston <markj at freebsd.org>
> wrote:
> >
> > > On Thu, Jul 12, 2018 at 10:35:52PM +0000, Mateusz Guzik wrote:
> > > > Author: mjg
> > > > Date: Thu Jul 12 22:35:52 2018
> > > > New Revision: 336231
> > > > URL: https://svnweb.freebsd.org/changeset/base/336231
> > > >
> > > > Log:
> > > >   uma: whack main zone counter update in the slow path, freeing side
> > > >
> > > >   See r333052.
> > > >
> > > > Modified:
> > > >   head/sys/vm/uma_core.c
> > > >
> > > > Modified: head/sys/vm/uma_core.c
> > > > ============================================================
> > > ==================
> > > > --- head/sys/vm/uma_core.c    Thu Jul 12 22:34:40 2018
> (r336230)
> > > > +++ head/sys/vm/uma_core.c    Thu Jul 12 22:35:52 2018
> (r336231)
> > > > @@ -3135,14 +3135,6 @@ zfree_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;
> > > > -
> > >
> > > Doesn't this break the accounting of these stats?  uma_reclaim()
> doesn't
> > > update them when it frees cached items, and uma_zone_get_cur() doesn't
> > > look at the stats for cached buckets.
>



-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the svn-src-all mailing list