svn commit: r358432 - in head/sys: kern sys vm

Mark Johnston markj at freebsd.org
Wed Mar 4 22:22:01 UTC 2020


On Wed, Mar 04, 2020 at 01:15:59PM -0800, Eric Joyner wrote:
> Hi Mark,
> 
> Is the addition of #include <sys/_bitcount.h> in sys/sys/refcount.h
> actually necessary? I don't see anything in there used in refcount.h, and
> the kernel appears to compile without it, at least on amd64.

No, it is left over from an earlier iteration of the patch.  I will
remove it.  Thanks.

> On Fri, Feb 28, 2020 at 8:05 AM Mark Johnston <markj at freebsd.org> wrote:
> 
> > Author: markj
> > Date: Fri Feb 28 16:05:18 2020
> > New Revision: 358432
> > URL: https://svnweb.freebsd.org/changeset/base/358432
> >
> > Log:
> >   Add a blocking counter KPI.
> >
> >   refcount(9) was recently extended to support waiting on a refcount to
> >   drop to zero, as this was needed for a lockless VM object
> >   paging-in-progress counter.  However, this adds overhead to all uses of
> >   refcount(9) and doesn't really match traditional refcounting semantics:
> >   once a counter has dropped to zero, the protected object may be freed at
> >   any point and it is not safe to dereference the counter.
> >
> >   This change removes that extension and instead adds a new set of KPIs,
> >   blockcount_*, for use by VM object PIP and busy.


More information about the svn-src-all mailing list