Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18258966rwd; Tue, 27 Jun 2023 14:15:44 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5g/xtfWv9vZyjYmbD+jT65m1/pPvfzoh3VTvkgNnDEUEk+2mqc3BlETjSqpSG9q4NSk38M X-Received: by 2002:a05:6a00:1483:b0:65d:d5cd:6f17 with SMTP id v3-20020a056a00148300b0065dd5cd6f17mr34459194pfu.24.1687900544413; Tue, 27 Jun 2023 14:15:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687900544; cv=none; d=google.com; s=arc-20160816; b=irHmOlYprRMMQhYdo7u+pUAoX8xMjAYOsab38vFP+ktlKTxPSeB0mwnDWR3ztlUkc7 Ke8Sa5JYYK8aSBzQVDsujD/HY68VzQ3JgcvxAvvKwh8RhxQ+O9z6jyjpMQpHNoWt0usy b48FdY1O1YuIwjqBW0T2RFlDgfGOUwrlybLwsR4gNhyIP8dMmr2cy9jeRAQSOni8/lC4 zNdbUhBikXiDAqJSHs1bgJQGtDQQsPZU8SpoRfVfTiXv5eOX+1wZRy7e4vVQrTyop0IF NY+OwHEimcXuTSctZOx8GRLERZ/Gwyx/e06d0bNhri9s18ilw3bfi+34nFGcG24DXUSZ 71Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=XFHD0hnOjuhPYILDUOJLbgwpgA6DIsDBsAhcitDEBFU=; fh=ZH5G/lbQpn6IXqNrH1tnbz6znsu2zWAFFI6Uj/7+OqY=; b=0YL8UJggDCoaXguVoHoEwsZUdSndEctsLC9vicgx+EktUmLSkJJEOy9E0ZSa4U0hfd PHNTRcvZlc9JvRIx1DG8UWEKBwEni1DDSKLV1sjJiyIbg4qzLMwJpNk1zkK5t+ZoAtCQ vgUAw/Uepwp4Ycu7/69G8HNcyV3uBoQAot2cs4CpPFx45IIPbIysqRSWkj+/xZyMDk/C k80EkrlXnMwd7By9GcIDjDH1rykRjJGaaJkoF//0VulxZyqpOEH+AzOXxOkPSC0ECHuZ KtxXbllKIyabMN8zfXgrIym5Slhz3YCLiBeP1h2j8yYMvYPNhWcSobe6ByUD7R+T0Tre cLBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=AyDbzfEO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cj14-20020a056a00298e00b0067ea76a7c59si1180448pfb.50.2023.06.27.14.15.32; Tue, 27 Jun 2023 14:15:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=AyDbzfEO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230432AbjF0Uxt (ORCPT + 99 others); Tue, 27 Jun 2023 16:53:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbjF0Uxp (ORCPT ); Tue, 27 Jun 2023 16:53:45 -0400 Received: from mail-oi1-x22d.google.com (mail-oi1-x22d.google.com [IPv6:2607:f8b0:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58FDE19A9 for ; Tue, 27 Jun 2023 13:53:23 -0700 (PDT) Received: by mail-oi1-x22d.google.com with SMTP id 5614622812f47-3a1a47b33d8so4435820b6e.2 for ; Tue, 27 Jun 2023 13:53:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1687899202; x=1690491202; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=XFHD0hnOjuhPYILDUOJLbgwpgA6DIsDBsAhcitDEBFU=; b=AyDbzfEOwQNJQ3Q6vCBJpIzejWz0XI+CwqIDE8UgstFVF4GBN1zCUvimRHgNDXa99Q 0A2XitElZYl4vkOr9ytUm0PmYJ5QsEPCI+4zrbGGcbdnAJac6UffXXzvU8rbykoGAN78 RiYeGRGQi0rsCCIEmUY28CGLOcGd0QWkwDLQhn+j3WVmaQn0hiL1rrTM2ApFwPn3rmOW aIKz2rrQIuBq1j3yLWNWP1JGfXvLJejgPPRaYR2Sfe6YM1MfNiNFxfm4n9PGXCTAc+Ec tpgYnKyue/RmYU1Emj+1xNmzsPduOW3Zz+V1MnsoHZ24+8K57GccuEEID0ga5vyglJnq m0Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687899202; x=1690491202; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XFHD0hnOjuhPYILDUOJLbgwpgA6DIsDBsAhcitDEBFU=; b=AK5ntfnEw9AyxcW7gf5YwUk/Ba28IjzvU11U0WHDoFGkEee9uy7/iVDrgc42D3JBO0 NUHEgs0bgt/oxCkOLpLPABV52Y7+TBi1+kKnzR/D7uwfh4DFJfAKEyC0srZI5XmY0SQu EqpI/TpRxg1gY4BIfE2oHIylVB3tcTB8KUZqfTtRziimiT3AuPc0UH+Di6x9v7RpjnAT pv8Q873q1AAEyC9U4IJDJdCdrJ480fbQU7Rt5/drirMbuHf4v4IY3/dUD4QuIRfn9CfH wPpDqZhTol3ZZln5wS7/3zTVCgMRcHUVQelVxRbsIdUqpna1GM2HXeAeBF7NtsCKfgjt wstg== X-Gm-Message-State: AC+VfDysAWCD2sYil0Jf55FzQ2Pt3GLjhti4kp5xUHocKWW3eDgspToD z2hjfK4qC94SnluJ0OTd2ZDHEg== X-Received: by 2002:a05:6808:2a47:b0:3a1:df16:2e9e with SMTP id fa7-20020a0568082a4700b003a1df162e9emr6357738oib.12.1687899202175; Tue, 27 Jun 2023 13:53:22 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id q131-20020a817589000000b00565eb8af1fesm2009195ywc.132.2023.06.27.13.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 13:53:21 -0700 (PDT) Date: Tue, 27 Jun 2023 13:53:17 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Jason Gunthorpe cc: Hugh Dickins , Andrew Morton , Gerald Schaefer , Vasily Gorbik , Mike Kravetz , Mike Rapoport , "Kirill A. Shutemov" , Matthew Wilcox , David Hildenbrand , Suren Baghdasaryan , Qi Zheng , Yang Shi , Mel Gorman , Peter Xu , Peter Zijlstra , Will Deacon , Yu Zhao , Alistair Popple , Ralph Campbell , Ira Weiny , Steven Price , SeongJae Park , Lorenzo Stoakes , Huang Ying , Naoya Horiguchi , Christophe Leroy , Zack Rusin , Axel Rasmussen , Anshuman Khandual , Pasha Tatashin , Miaohe Lin , Minchan Kim , Christoph Hellwig , Song Liu , Thomas Hellstrom , Russell King , "David Sc. Miller" , Michael Ellerman , "Aneesh Kumar K.V" , Heiko Carstens , Christian Borntraeger , Claudio Imbrenda , Alexander Gordeev , Jann Horn , Vishal Moola , Vlastimil Babka , linux-arm-kernel@lists.infradead.org, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v2 05/12] powerpc: add pte_free_defer() for pgtables sharing page In-Reply-To: Message-ID: <7b1be7d-9287-cbc6-ef7-55e44625e4e@google.com> References: <54cb04f-3762-987f-8294-91dafd8ebfb0@google.com> <5cd9f442-61da-4c3d-eca-b7f44d22aa5f@google.com> <2ad8b6cf-692a-ff89-ecc-586c20c5e07f@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 27 Jun 2023, Jason Gunthorpe wrote: > On Wed, Jun 21, 2023 at 07:36:11PM -0700, Hugh Dickins wrote: > > [PATCH v3 05/12] powerpc: add pte_free_defer() for pgtables sharing page ... > Yes, this makes sense to me, very simple.. > > I always for get these details but atomic_dec_and_test() is a release? > So the SetPageActive is guarenteed to be visible in another thread > that reaches 0? Yes, that's my understanding - so the TestClearPageActive adds more to the guarantee than is actually needed. "release": you speak the modern language, whereas I haven't advanced from olden-days barriers: atomic_dec_and_test() meets atomic_t.txt's - RMW operations that have a return value are fully ordered; which a quick skim of present-day memory-barriers.txt suggests would imply both ACQUIRE and RELEASE. Please correct me if I'm mistaken! Hugh