svn commit: r323393 - in head/sys: sys vm

Mateusz Guzik mjguzik at gmail.com
Mon Sep 11 08:37:53 UTC 2017


On Mon, Sep 11, 2017 at 10:24 AM, Ryan Libby <rlibby at freebsd.org> wrote:

> On Mon, Sep 11, 2017 at 12:30 AM, Mateusz Guzik <mjguzik at gmail.com> wrote:
> [...]
> > That said, looking now at the struct I think its use should be retired
> > from the kernel. It can remain in headers for userspace use.
> >
> > First, there is a bunch of counter(9) fields. I don't know the original
> > reasoning. I would expect these counters to be statically defined in a
> > per-cpu struct.
>
> The actual counter(9) counters are per-CPU.  These are just offsets into
> the PCPU area.  See r317061 / D10156 (recent work by glebius).
>

I mean their ids are allocated on boot, even though these counters are
always present and could be resolved at compilation time. So in order
to update them you have to fetch the id, as opposed to having the code
just do the right thing.

I.e. for stuff which is always there we should just have well known offsets
into per-cpu tables. But I'm not going to try to flame a patch in (or write
one).

-- 
Mateusz Guzik <mjguzik gmail.com>


More information about the svn-src-head mailing list