Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3444538yba; Mon, 29 Apr 2019 02:25:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjiAHDoDWAcDOHYqz4xAu5maoT8LyAiVE72J9JODMOfW9Fnb2v2CiPxBxwpWeDN3oaDokt X-Received: by 2002:a65:62cc:: with SMTP id m12mr58251441pgv.118.1556529942510; Mon, 29 Apr 2019 02:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556529942; cv=none; d=google.com; s=arc-20160816; b=r15vAvTqbQiFrqVDSxfqkFj8Ijmbhi2NEv69Jf9Pa8C+SQJRWpBTFEK4oFuXhZeMPv kQbeLMWLeyhCmceKSnrgEvD388S+htBv7pkRikLVBb15QPwxkiFhZxSXgysV8J2KQ7bD KQWixJQtpWJrA8f20UpFP2bCN8tUfkldp3B22EBhNNvjzLCqvO2lWz+SroZ+105qJUJX 7Kj7qHhqsWdrR1YiADP7O0giPojCWarDFkec8plMAJLiKr/lJuXzxGQgOTsjw2j2o3SI FbnJ9rpgJ4VbEm4aNo5Wa+F3LM0DpuNiETelP0vkNTh4sDc0+3c+Svt2xk8D69rA1NFr B3yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=PEJdVdZWdwXAxOfDG1xY+PigwDXCpbRA1Hg7zPvHQ6o=; b=X8MQN+pHlJ4aCJ+d5zF7M3g4rnwbLO+s4tY3TaDbMUNqMBvExoDSoLQILlKKL+Mt8c SuR89DNiwFdMhMLR6jtFkplcYooRgcwVvXbpOV2gt6uhJ5tHnJVkKqscXOBDvVo0elE1 ak4FAJYhsPVSM2WEoLcaLXaPlnhK/JS9s9cAXoqxlUfAurSJNvuz/EtSwfSOkBgB+XWt BDvqxPwPmssVatGdZTVuqYvZWLHXHWeXAhJ6T8zPlTqsQkN5sN9VSUMIxpgeuUueKsrb FA33DTvuT9TI+XuRT0jeXA5aJIwiGSs6JZKZxAaJic+IGPggIWIqFHCSfftK0WE/k8LP kGfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12si49134pgi.36.2019.04.29.02.25.26; Mon, 29 Apr 2019 02:25:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727624AbfD2JYd (ORCPT + 99 others); Mon, 29 Apr 2019 05:24:33 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:41614 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727072AbfD2JYc (ORCPT ); Mon, 29 Apr 2019 05:24:32 -0400 Received: by mail-lj1-f196.google.com with SMTP id k8so8665765lja.8 for ; Mon, 29 Apr 2019 02:24:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=PEJdVdZWdwXAxOfDG1xY+PigwDXCpbRA1Hg7zPvHQ6o=; b=GfK54Lv/zee/iL/t0fBaNmTn1PaER5zOFF3h0Rm87LybGU/LKBCEUkaTuNLGalSbvH 4mXPPxkhm9xleq3lbC+2H5hJgOdVjncpv3BzCzkSvC+omW2zCYZHcAW7J/TLj2EfU4S+ fxPe0Z10WvsI6TLlWoOKOQAWtpZ4f9qAqt7KPQL0pN/jhKBCviCCVkwB3S8+KneUhH4T AjBOJKL1odaHVroPx7VPIXkm0c/J7TyhCoUrGRw1DHXKzGTZ1xxiob0zcRBvKVO+wFlZ gxoFjNmM24u+MEclGj8xj0YxPiOmgP6zMIcwmBHFwPYU6i0ttMlGFYO4Fndlt5aUvK/i haEQ== X-Gm-Message-State: APjAAAXKDl2ZA7+sYvx3gTaZLgz2GajB2Mmhzqdkob1zyELSIaTi+nwD 6qnbDymhg5peYzYuEydbQ5A= X-Received: by 2002:a2e:3815:: with SMTP id f21mr9029618lja.25.1556529870868; Mon, 29 Apr 2019 02:24:30 -0700 (PDT) Received: from xi.terra (c-74bee655.07-184-6d6c6d4.bbcust.telenor.se. [85.230.190.116]) by smtp.gmail.com with ESMTPSA id m28sm7242040lfc.71.2019.04.29.02.24.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 02:24:29 -0700 (PDT) Received: from johan by xi.terra with local (Exim 4.91) (envelope-from ) id 1hL2WU-0002zz-Pi; Mon, 29 Apr 2019 11:24:30 +0200 Date: Mon, 29 Apr 2019 11:24:30 +0200 From: Johan Hovold To: "Paul E. McKenney" Cc: Peter Zijlstra , Nicholas Piggin , LKMM Maintainers -- Akira Yokosawa , Andrea Parri , Boqun Feng , David Howells , Daniel Lustig , Jade Alglave , Kernel development list , Luc Maranget , Alan Stern , Will Deacon Subject: Re: [PATCH] Documentation: atomic_t.txt: Explain ordering provided by smp_mb__{before,after}_atomic() Message-ID: <20190429092430.GF26546@localhost> References: <20190419180017.GP4038@hirez.programming.kicks-ass.net> <20190419182620.GF14111@linux.ibm.com> <1555719429.t9n8gkf70y.astroid@bobo.none> <20190420085440.GK14111@linux.ibm.com> <20190423123209.GR4038@hirez.programming.kicks-ass.net> <20190423133010.GK3923@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190423133010.GK3923@linux.ibm.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 23, 2019 at 06:30:10AM -0700, Paul E. McKenney wrote: > On Tue, Apr 23, 2019 at 02:32:09PM +0200, Peter Zijlstra wrote: > > On Sat, Apr 20, 2019 at 01:54:40AM -0700, Paul E. McKenney wrote: > > > And lock acquisition??? acm_read_bulk_callback(). > > > > I think it goes with the set_bit() earlier, but what do I know. > > Quite possibly! In that case it should be smp_mb__after_atomic(), > and it would be nice if it immediately followed the set_bit(). I noticed this one last week as well. The set_bit() had been incorrectly moved and without noticing the smp_mb__before_atomic(). I've submitted a patch to restore it and to fix a related issue to due missing barriers: https://lkml.kernel.org/r/20190425160540.10036-5-johan@kernel.org Johan