Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp2345138ybj; Mon, 23 Sep 2019 02:07:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyxaI1nI8o6/R4Vm+cwLRcL7PrJJVpch6n15sFBd75iGGX34n/xQHX8J4TJOSgn24ExH2NP X-Received: by 2002:a17:906:5c16:: with SMTP id e22mr4241209ejq.105.1569229650025; Mon, 23 Sep 2019 02:07:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569229650; cv=none; d=google.com; s=arc-20160816; b=sflidT83gWatII/ox5pymL+/Mqc9Nam3YJd4uE9PNHp0Xcb/HdoMoOr6Uc5Wmfl24W qLV90O/lF529150Fc9TdaSdl/LGYrdzbh6r1MZw4tI5maGaFwJrds/GJKmb4lioTpFzx 8USIaO5emDRuqHiyBLjnh1WnRooM5vs3Di8jF0tJuh0m38t8IzAnbRK24kVoxERGK9I1 y/4xLyvHKDt332L3S8XDf7RiP2f6vcO6cdxZIgGtW4Ae5VvzLx1KABoknsHcKbSa6IkY 0qztvPJIUmjeSCQ73Zuv5W2p4GrrCYRSFucCt0scWSMD/ihQ2pRSCm2hha/6e3Cs+AbY D0qw== 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=tY5hbY1L75zbjhqXqcaJmqLRLyZ13da9k/WnhOyjboA=; b=w5yHThbVYTY2HNw7Ccdi9b0tj/9e6QI5mAgsxny0UgqIljdEI+V8M8v12qqcOitCId evpBpmvIVmhR0/GfZDhrFPNrBpt8T8h6r9kynqgGaeRJb9A2zFj3ZpiuDT6jAGsF1IkM xRAXfxnmgFwo5eRMT9e9xBi9R7Zq3qGhc8v0XQ2wgZFzJa5HulME4Ezw9exiCmCXFQVG xgm7kcY6d97ByrlKovndcMdWlJrbIXrhKVMwxEoXsokVtWB+XIJKC44ooB1TujHd33re avAtTEomNay/fA6LHA/Z24EisQKqv4q0JnqGLCYCzDu8RNKWkBVg/qzpz6RaRA0IbYJb jLcQ== 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 e31si3805371ede.199.2019.09.23.02.07.07; Mon, 23 Sep 2019 02:07:29 -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 S1729914AbfITTwo (ORCPT + 99 others); Fri, 20 Sep 2019 15:52:44 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:28886 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727632AbfITTwm (ORCPT ); Fri, 20 Sep 2019 15:52:42 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8KJltZs016027; Fri, 20 Sep 2019 15:52:16 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v53r5k7qt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Sep 2019 15:52:15 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x8KJlvtx016107; Fri, 20 Sep 2019 15:52:15 -0400 Received: from ppma01dal.us.ibm.com (83.d6.3fa9.ip4.static.sl-reverse.com [169.63.214.131]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v53r5k7qa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Sep 2019 15:52:15 -0400 Received: from pps.filterd (ppma01dal.us.ibm.com [127.0.0.1]) by ppma01dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x8KJoHUS025078; Fri, 20 Sep 2019 19:52:13 GMT Received: from b03cxnp08026.gho.boulder.ibm.com (b03cxnp08026.gho.boulder.ibm.com [9.17.130.18]) by ppma01dal.us.ibm.com with ESMTP id 2v3vbucv8x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Sep 2019 19:52:13 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8KJqCUJ59703560 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 20 Sep 2019 19:52:12 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3A3EA7805C; Fri, 20 Sep 2019 19:52:12 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A239D7805E; Fri, 20 Sep 2019 19:52:07 +0000 (GMT) Received: from LeoBras.aus.stglabs.ibm.com (unknown [9.18.235.184]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Fri, 20 Sep 2019 19:52:07 +0000 (GMT) From: Leonardo Bras To: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.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 , Thomas Gleixner , Richard Fontana , Ganesh Goudar , Allison Randal , Greg Kroah-Hartman , Mike Rapoport , YueHaibing , Ira Weiny , Jason Gunthorpe , John Hubbard , Keith Busch Subject: [PATCH v2 11/11] powerpc/mm/book3s64/pgtable: Uses counting method to skip serializing Date: Fri, 20 Sep 2019 16:50:47 -0300 Message-Id: <20190920195047.7703-12-leonardo@linux.ibm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190920195047.7703-1-leonardo@linux.ibm.com> References: <20190920195047.7703-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-20_07:,, 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=702 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909200161 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 13239b17a22c..41ca30269fa3 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); } void start_lockless_pgtbl_walk(struct mm_struct *mm) -- 2.20.1