Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1892525ybn; Thu, 26 Sep 2019 03:54:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqyKqTNIh/caXfpCuwCxnn2OJJPKb8Latn9VPCyP8uGQbU1wGBcIsgdTXiWLYcWFZ5AYwy1Q X-Received: by 2002:a50:cfc7:: with SMTP id i7mr2731305edk.89.1569495299840; Thu, 26 Sep 2019 03:54:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569495299; cv=none; d=google.com; s=arc-20160816; b=dz43bJOA1B8SrRaMd9TpI4++kBntPrBX8QmCRkMVbwA/xcpa9NfMTctv1XQ38S5gPt IeyhIYj1UElu5bZldszh2B41UgRYisjC4x0HPg7rAmVpZbCByolvAtPsyxBQSl/q69w/ bf60dUhXMSrAxnn2+ZNF0UL+t4pCuo/1SosS2G2eVz/8IFt11KRTEr1rw6w9IewaVmEr 7Grmuu8gFq7vhX6/+ZPyfWo2XJqUtn7DncGvaMSArkt/ZEOHwA4rABKTQr4dz3dsK7mt pRPi+3G19nU9Haoqai1afcGpAPLUjprOIqjH8T+8oK1DwGyByQAUJQLpx5sZiCkIMEdB UgFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=KgDPu9AvXHzwutF/tGCszy6Zy5yn/XR5Uh3QMoONswA=; b=XWFqRLoC/K4GkCGFP0YW5KBfSz2KpfckOQZo/8hUFUEjM5oZ5vIlPjG2xUHyfM3mRC s6/kyghoHkhoU9Y599Eo385GzcHgdpKwRv1STb/o99xzrXUPI1zhztpNvBdkq7Vox0g7 QHfum9kBhO5mdRxlPQHH5DAMziwTv+bRdF+HexVXO1Mprsmbh2UmvUU9GAG3egsPpEsI W8tcDm0iwAW03cX7tKgx6UMOHs+0mSVtSsVUi6UdbvYNpvrOpFwmXFoh+4BXTEN1gIvf o5CLRqFMYxmnOYtouLLNNoeUOgwnYzBl1DJJUm4/zpFPekalz8doajWE7vxaeOd3puRU WIBA== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si794452ejk.301.2019.09.26.03.54.36; Thu, 26 Sep 2019 03:54:59 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2633557AbfIXV01 (ORCPT + 99 others); Tue, 24 Sep 2019 17:26:27 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:6094 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2633554AbfIXV0W (ORCPT ); Tue, 24 Sep 2019 17:26:22 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8OLMPZ0010840; Tue, 24 Sep 2019 17:25:43 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v7rb861ec-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Sep 2019 17:25:42 -0400 Received: from m0098421.ppops.net (m0098421.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x8OLMXFY011580; Tue, 24 Sep 2019 17:25:42 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v7rb861dv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Sep 2019 17:25:42 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x8OLPY5n008769; Tue, 24 Sep 2019 21:25:41 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma04dal.us.ibm.com with ESMTP id 2v5bg7fyet-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Sep 2019 21:25:41 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8OLPd6U58130802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Sep 2019 21:25:39 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 73E20C605B; Tue, 24 Sep 2019 21:25:39 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D2958C6055; Tue, 24 Sep 2019 21:25:34 +0000 (GMT) Received: from LeoBras.aus.stglabs.ibm.com (unknown [9.18.235.184]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Tue, 24 Sep 2019 21:25:34 +0000 (GMT) From: Leonardo Bras To: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org Cc: Leonardo Bras , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Arnd Bergmann , "Aneesh Kumar K.V" , Christophe Leroy , Andrew Morton , Dan Williams , Nicholas Piggin , Mahesh Salgaonkar , Greg Kroah-Hartman , Thomas Gleixner , Ganesh Goudar , Allison Randal , Mike Rapoport , YueHaibing , Ira Weiny , Jason Gunthorpe , John Hubbard , Keith Busch Subject: [PATCH v3 11/11] powerpc/mm/book3s64/pgtable: Uses counting method to skip serializing Date: Tue, 24 Sep 2019 18:24:28 -0300 Message-Id: <20190924212427.7734-12-leonardo@linux.ibm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190924212427.7734-1-leonardo@linux.ibm.com> References: <20190924212427.7734-1-leonardo@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-09-24_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=686 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909240173 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Skips slow part of serialize_against_pte_lookup if there is no running lockless pagetable walk. Signed-off-by: Leonardo Bras --- arch/powerpc/mm/book3s64/pgtable.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/book3s64/pgtable.c b/arch/powerpc/mm/book3s64/pgtable.c index 0b86884a8097..e2aa6572f03f 100644 --- a/arch/powerpc/mm/book3s64/pgtable.c +++ b/arch/powerpc/mm/book3s64/pgtable.c @@ -95,7 +95,8 @@ static void do_nothing(void *unused) void serialize_against_pte_lookup(struct mm_struct *mm) { smp_mb(); - smp_call_function_many(mm_cpumask(mm), do_nothing, NULL, 1); + if (running_lockless_pgtbl_walk(mm)) + smp_call_function_many(mm_cpumask(mm), do_nothing, NULL, 1); } /* -- 2.20.1