Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Jun 2018 22:07:17 -0700
From:      Matthew Macy <mat.macy@gmail.com>
To:        Mateusz Guzik <mjguzik@gmail.com>
Cc:        Ryan Libby <rlibby@freebsd.org>, Mark Johnston <markj@freebsd.org>,  Konstantin Belousov <kostikbel@gmail.com>, Justin Hibbits <jhibbits@freebsd.org>,  src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r334708 - head/sys/kern
Message-ID:  <CAPrugNpSqDRT0zp%2B%2B8Xz%2BkOGQwcsNQEWbcGX6SRLkUpEcTz11Q@mail.gmail.com>
In-Reply-To: <CAGudoHENGpCxn_omxfaRLOAH5fP6qdFcmmqZ7He%2BpcC=-1HFKQ@mail.gmail.com>
References:  <201806061257.w56CvCwq089369@repo.freebsd.org> <20180606140311.GU2450@kib.kiev.ua> <20180608033242.GA54099@pesky> <CAHgpiFyOQf6B3oGFGMz3avXqrrP0i6Puy9HqLER1XG5xE67BeQ@mail.gmail.com> <CAGudoHENGpCxn_omxfaRLOAH5fP6qdFcmmqZ7He%2BpcC=-1HFKQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> The main codepath which runs into this (... -> cache_lookup -> vhold) most
> definitely does not need the fence for production operation.
>
> What is unclear without audit is whether there are vhold users which need
> one. I think the patch is fine to go in if the other VI_FREE place gets a
> comment about a fence stemming from mtx_unlock and there is another one
> prior to the assertion explaining that this orders against v_iflag tests and
> may
> or may not be needed for other consumers.
>
> In general the code is *full* of data races and accidental reliance of
> ordering
> provided by amd64. Weeding this all out will be a painful exercise.
>
> Part of the problem is lack of primitives like READ_ONCE/WRITE_ONCE as
> seen in the linux kernel, someone should hack up equivalents.

CK of course has these. We can create a wrapper around them if we
don't want to use them directly.
-M



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPrugNpSqDRT0zp%2B%2B8Xz%2BkOGQwcsNQEWbcGX6SRLkUpEcTz11Q>