Date: Fri, 23 Mar 2018 03:36:41 +0100 From: Mateusz Guzik <mjguzik@gmail.com> To: Alexander Motin <mav@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r331404 - in head: cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/contrib/opensolaris/uts/common sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/u... Message-ID: <CAGudoHEH8W9-D8YFFDF6Fw_roCBLaG3p7CAV5deaBRerNcXttg@mail.gmail.com> In-Reply-To: <201803230215.w2N2F6wL070720@repo.freebsd.org> References: <201803230215.w2N2F6wL070720@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Mar 23, 2018 at 3:15 AM, Alexander Motin <mav@freebsd.org> wrote: > Author: mav > Date: Fri Mar 23 02:15:05 2018 > New Revision: 331404 > URL: https://svnweb.freebsd.org/changeset/base/331404 > > Log: > MFV r331400: 8484 Implement aggregate sum and use for arc counters > > In pursuit of improving performance on multi-core systems, we should > implements fanned out counters and use them to improve the performance of > some of the arc statistics. These stats are updated extremely frequently, > and can consume a significant amount of CPU time. > > > > Due to seriously fat locks this struct: typedef struct aggsum_bucket { kmutex_t asc_lock; int64_t asc_delta; uint64_t asc_borrowed; uint64_t asc_pad[4]; /* pad out to cache line (64 bytes) */ } aggsum_bucket_t __aligned(CACHE_LINE_SIZE); ends up using *two* cache lines. Without asc_pad the size is 48 bytes. asc_pad adds 4 * 8 = 32 which pushes it to the next line for no good reason. That said, I suggest #ifndefing it the field. -- Mateusz Guzik <mjguzik gmail.com>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGudoHEH8W9-D8YFFDF6Fw_roCBLaG3p7CAV5deaBRerNcXttg>