From owner-svn-src-all@freebsd.org Fri Jun 8 05:07:19 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EBED31010347; Fri, 8 Jun 2018 05:07:18 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: from mail-it0-x229.google.com (mail-it0-x229.google.com [IPv6:2607:f8b0:4001:c0b::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DA1B72DD7; Fri, 8 Jun 2018 05:07:18 +0000 (UTC) (envelope-from mat.macy@gmail.com) Received: by mail-it0-x229.google.com with SMTP id k17-v6so4104536ita.0; Thu, 07 Jun 2018 22:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=EQ81TYL5ERNZEKvhGNzHcohdvYgOYLMVJZo1uEfne8k=; b=opKk57MDwvHQiVEqOMG+gpiVtMndnioCz3vOtFOoKF6fcPA++jnEOptEn8V7VxTy3g XmUvwi7cnLgOES6u14d6PDn16kmt7jCTBE2gIiYCYu17xQ+VTuWkvql0qkGz7WSACzzp 3ATg6CTpnbekBbUVJ97Eh+3BqmK5AJM4JwV5tvveqLm9KSTDqiQVoT8sKgB0VhISJjaF nkbXaRStRMICFjTBaaG7i02+GJ4kiT/D3wfrUjBezBAgl2i0eYLPIi5xBjIS9uJD7mty uFUduVto0lh5zEYEhHtwdutvEHgexdg6cx/qGbq0UFAmoM+Xah2Ocblzh20M+2dimbrv 4cSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=EQ81TYL5ERNZEKvhGNzHcohdvYgOYLMVJZo1uEfne8k=; b=IJxhvvx/bPFQdmJuReU4opFh2avq03qMEZ2DnJab7fR2FtkaKiQk8iIO6O0f1emRmH BQu0aDAe4wkfjXvZMR8AKOy1TQ9PEDo/VVDM1wyTkZm4kH9YWPmBorMCvIp3VK4YyPNU BE+U1nXRXHn6Tputc16p93nucAFmd9RLhHy7B2G23TwnYwobUNCruK5MS3MH5TLq3it/ TXXXxFj7X6VXoyCoEE8Und9B79AsrrLB+Mow/9JlqJ73jtjY84WxNCv1TvAZtF31GAUa L5tKaDT0udKEPplm6ppISAP0rJrgdxza+tjGjzEAwywvFZ5zHLXqgMI/0OZ3NKIcib8D k1vg== X-Gm-Message-State: APt69E2jWagUy7UgeIqaXChwMDXXLmZCWwTFNRndH8AwSYFWX7LfroXm YD2BSzjklSZ+JziMYDD/J1cyhvrhtgQNHnoH9fk= X-Google-Smtp-Source: ADUXVKJfrqnbBMyvbgPlOXPVUr5EXblveyPvpUXJzVOcK/AXMUhregTTi2guJIWHM6B1QmlnAO4jG496JQ/xLvt+bE0= X-Received: by 2002:a24:4a15:: with SMTP id k21-v6mr496017itb.128.1528434437633; Thu, 07 Jun 2018 22:07:17 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:8cd:0:0:0:0:0 with HTTP; Thu, 7 Jun 2018 22:07:17 -0700 (PDT) In-Reply-To: References: <201806061257.w56CvCwq089369@repo.freebsd.org> <20180606140311.GU2450@kib.kiev.ua> <20180608033242.GA54099@pesky> From: Matthew Macy Date: Thu, 7 Jun 2018 22:07:17 -0700 Message-ID: Subject: Re: svn commit: r334708 - head/sys/kern To: Mateusz Guzik Cc: Ryan Libby , Mark Johnston , Konstantin Belousov , Justin Hibbits , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2018 05:07:19 -0000 > 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