Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp2515333rwb; Mon, 3 Oct 2022 01:44:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Mb7PRDm+c9DF2nxh1B2S0nAsmaE4fXWcurncpYSCEnEvGXq7V+BRqjzLhtUVYNG113NVi X-Received: by 2002:a17:90b:33c5:b0:202:fa60:3769 with SMTP id lk5-20020a17090b33c500b00202fa603769mr11065577pjb.60.1664786664988; Mon, 03 Oct 2022 01:44:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664786664; cv=none; d=google.com; s=arc-20160816; b=KIeZWleUnTnFWpTlwM3llY7ql0nB1LTVoYFZALf/+49LAHb05kqiU+2Sy+MNBiG2a3 gWLOj1SIXn+gc56XCzDkMw6fDg7K6q54sz9ynRKTUuT7BuocEHfWVNHKfk7XzHhZgY2x K7H6OGKSaylcuKDfQgq/6G97WEdcp5MwZ7V0ZhPdco/niiPAouxvbriTmw1iXRJzkln1 +R5GWP7ByUtmSXXywWJ9oY6pduVLLNZckkOYugz1n69JghEpPXu5w0LCBTsdrvEsMn0y oQPZ4weKQwN5K+axab27gJ0l15IpQJwzAIzPz+wt+B0pZCKIOAA/iV7MpExT3RHdbMt7 Tfog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=eqtgcvPKLjyKYJBgqNjsHr1/P83N4RBuT+kjJAhs2gg=; b=FzJC56huIl9HX5py3NC1UkKdvBWLJOr4Ot83jjeTRKRWuy3Jkn4kfEfwJkQ1qSxmOv o++ywxK3T+7JMXq0BxGLIsEXpiXEMV1xNW2Aiof0zqMMSSBHYncENg8GaVfdPqv/4VHX GVgWcd0JJaWrSIspycAyTcnPEdyvqOzek6dX2wr4MsZa8l3Otlq2CB4/h6gUN13wyccs +I2KbowKmufSQBFYYz9A53Nf8vDQDHd4NMVAsXGd5yLKcXvGKsCx3SYszIAxiPjF59cz UwRXrhG+4uENXbA+Yqsd4YUWUFi8/dW9JZaup280NbiOtxW7pbMMkxKE0MLc7rlnC8WF DVog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=mcFAUieF; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k10-20020a056a00134a00b005409c35a01dsi10843093pfu.351.2022.10.03.01.44.13; Mon, 03 Oct 2022 01:44:24 -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=@linuxfoundation.org header.s=korg header.b=mcFAUieF; 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=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230458AbiJCHZP (ORCPT + 99 others); Mon, 3 Oct 2022 03:25:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230452AbiJCHXj (ORCPT ); Mon, 3 Oct 2022 03:23:39 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 479574B4A6; Mon, 3 Oct 2022 00:17:33 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A3CCBB80E6B; Mon, 3 Oct 2022 07:17:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E128EC433D6; Mon, 3 Oct 2022 07:17:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1664781445; bh=Ep335t2I/xaHGQeJd/i5wb01J+lIvEjwZwn2VcHR79Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mcFAUieFOPj1vEe/vfwrvP91635+QwDMBjq/k7y12SlxbYE2JsIII3mP2wRVUJAOV SJPW8M7KvxcnDuRnVhc9VXetw/wlthdY5YqM+9tsPgFv4Cwa+Vu85tTnEc8WZiFYfc 3TIGRrkVXmSBCPDpX7XJ2BM7ObPwq6NvLmgKjMaw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Aneesh Kumar K.V" , Yang Shi , David Hildenbrand , Peter Xu , Christophe Leroy , Hugh Dickins , Jason Gunthorpe , John Hubbard , "Kirill A. Shutemov" , Michael Ellerman , Nicholas Piggin , Andrew Morton Subject: [PATCH 5.15 22/83] powerpc/64s/radix: dont need to broadcast IPI for radix pmd collapse flush Date: Mon, 3 Oct 2022 09:10:47 +0200 Message-Id: <20221003070722.545874809@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221003070721.971297651@linuxfoundation.org> References: <20221003070721.971297651@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 From: Yang Shi commit bedf03416913d88c796288f9dca109a53608c745 upstream. The IPI broadcast is used to serialize against fast-GUP, but fast-GUP will move to use RCU instead of disabling local interrupts in fast-GUP. Using an IPI is the old-styled way of serializing against fast-GUP although it still works as expected now. And fast-GUP now fixed the potential race with THP collapse by checking whether PMD is changed or not. So IPI broadcast in radix pmd collapse flush is not necessary anymore. But it is still needed for hash TLB. Link: https://lkml.kernel.org/r/20220907180144.555485-2-shy828301@gmail.com Suggested-by: Aneesh Kumar K.V Signed-off-by: Yang Shi Acked-by: David Hildenbrand Acked-by: Peter Xu Cc: Christophe Leroy Cc: Hugh Dickins Cc: Jason Gunthorpe Cc: John Hubbard Cc: "Kirill A. Shutemov" Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/mm/book3s64/radix_pgtable.c | 9 --------- 1 file changed, 9 deletions(-) --- a/arch/powerpc/mm/book3s64/radix_pgtable.c +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c @@ -954,15 +954,6 @@ pmd_t radix__pmdp_collapse_flush(struct pmd = *pmdp; pmd_clear(pmdp); - /* - * pmdp collapse_flush need to ensure that there are no parallel gup - * walk after this call. This is needed so that we can have stable - * page ref count when collapsing a page. We don't allow a collapse page - * if we have gup taken on the page. We can ensure that by sending IPI - * because gup walk happens with IRQ disabled. - */ - serialize_against_pte_lookup(vma->vm_mm); - radix__flush_tlb_collapsed_pmd(vma->vm_mm, address); return pmd;