Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jan 2020 21:10:44 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Mateusz Guzik <mjguzik@gmail.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r356656 - in head/sys: kern sys
Message-ID:  <20200112191044.GB2068@kib.kiev.ua>
In-Reply-To: <CAGudoHFECqNqcumVZtRoVEZLXQ0i0Bou1=Bi7yeJB4Y2JxNTgQ@mail.gmail.com>
References:  <202001120609.00C69Anp050819@repo.freebsd.org> <20200112090010.GA2068@kib.kiev.ua> <CAGudoHFECqNqcumVZtRoVEZLXQ0i0Bou1=Bi7yeJB4Y2JxNTgQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 12, 2020 at 11:08:02AM +0100, Mateusz Guzik wrote:
> On 1/12/20, Konstantin Belousov <kostikbel@gmail.com> wrote:
> > On Sun, Jan 12, 2020 at 06:09:10AM +0000, Mateusz Guzik wrote:
> >> Author: mjg
> >> Date: Sun Jan 12 06:09:10 2020
> >> New Revision: 356656
> >> URL: https://svnweb.freebsd.org/changeset/base/356656
> >>
> >> Log:
> >>   Add "panicked" boolean which can be tested instead of panicstr
> >>
> >>   The test is performed all the time and reading entire panicstr to do it
> >>   wastes space.
> > What space does it waste ?  The space in the read-mostly section ?
> >
> > And what is the difference between reading a pointer vs. reading a byte ?
> > CPU still has to read the whole cache line.
> >
> 
> Note the annotation with __read_frequently which groups fields.
> 
> Currently it results in the following (with tail filled up from
> __read_mostly):
> 
> ----------------
> ffffffff80c01000 D hc_source_mask
> ffffffff80c01004 D pti
pti should be remove from __read_frequently, probably moving it
to __read_mostly is fine, and changed to bool as well.

> ffffffff80c01008 D locks_delay
> ffffffff80c0100c D locks_delay_retries
> ffffffff80c0100e D locks_delay_loops
> ffffffff80c01010 d fortuna_concurrent_read
> ffffffff80c01011 D random_chachamode
> ffffffff80c01012 D systrace_enabled
> ffffffff80c01013 D lockstat_enabled
> ffffffff80c01014 D dtrace_malloc_enabled
> ffffffff80c01015 D racct_enable
> ffffffff80c01016 D sdt_probes_enabled
> ffffffff80c01017 D panicked
> ffffffff80c01018 D kdb_active
> ffffffff80c01019 D trap_enotcap
> ffffffff80c0101a D audit_syscalls_enabled
> ffffffff80c01020 D cam_dflags
> ffffffff80c01028 d epoch_inited
> ffffffff80c01030 d rs_epoch
> ffffffff80c01038 d biozone
> ----------------
> 
> Should panicstr land here it would avoidably take up 8 bytes instead of 1.
> 
> -- 
> Mateusz Guzik <mjguzik gmail.com>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200112191044.GB2068>