Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4107623ybn; Fri, 27 Sep 2019 16:43:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxjA9dOXlgI/WcuCiAfvxPxdPSeyZPxjL9BU61KttpewuqmHpvNZecViE6uFQQqjn7zrr7e X-Received: by 2002:a17:906:e109:: with SMTP id gj9mr10005047ejb.160.1569627825842; Fri, 27 Sep 2019 16:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569627825; cv=none; d=google.com; s=arc-20160816; b=gb0o3cx24PGeYNVxAjjpAVc70yizwEp/SuUKRpHq/hlhZTRNZ16fjh5NtPqn3qGpbq /y6SLzM8fxPQVnoKUS0ThuAbtEn/pskgQ3gilSdo2dsDUzv6ZUF1bnrmF+5UIFDqqTY+ 4Y3558WswYUE4iSTqGL4IA/N8pYuikYB112fqG7ZJscvcxsYh7ohynP8FHvWx1dDvPxP c561LG/ajXGcr65q2DgO6Y6bjtpOSi82ixL5IoanJX40ZJ63eTXIwl/9O8RKgQxjeKQM KJvuowV46Zrhss6mPe65ya2wIIbAth+qAGqT5NREOtnOubT/6aCZGSLvqKYFdgdVpUQy g4vA== 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=dVA5IdmHUQpwXA00zNa8SdBntF1GfKhkxYAevoLTRpA=; b=mB3MXwow26+Q4QCwySsOLWX/qayfLlDQKlwh75Rxz0Bxm91C74KBzQSiyVOFT6Rb3i dTvroefvYiSHEgscoB8DL4yPyIkdRsx4pxoei8G5EtFpXkUIw/T8ouf28sQ+vedgL3SW NuvxyJ3MFn8gY1mLu5W9NyS9UwYpUscgMz2zsSyGx1Jvo4r88FvsDPbWepIgUFUeXsac qmDHO4hRe25BgWZgLm11ZdVkY/5wyOwCVn0TTBgY3oq6leRLOIjUb4DAvWFP7RXsVNM/ nCqH1DbgypKc84BF+yqiWf3IOQgTHwHQqiB7y0+lZRdLNmhoMxPXuSSLGSX7S1CiOTDY h5gw== 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 i17si3500274ejy.374.2019.09.27.16.43.21; Fri, 27 Sep 2019 16:43:45 -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 S1728337AbfI0Xme (ORCPT + 99 others); Fri, 27 Sep 2019 19:42:34 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:24652 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725815AbfI0Xmd (ORCPT ); Fri, 27 Sep 2019 19:42:33 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8RNfiDU085571; Fri, 27 Sep 2019 19:42:01 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v9umg8w8t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2019 19:42:01 -0400 Received: from m0098410.ppops.net (m0098410.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x8RNg1hs085952; Fri, 27 Sep 2019 19:42:01 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v9umg8w8j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2019 19:42:00 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x8RNePAk030822; Fri, 27 Sep 2019 23:41:59 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma03wdc.us.ibm.com with ESMTP id 2v5bg7v7pr-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2019 23:41:59 +0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8RNfx7F37159414 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Sep 2019 23:41:59 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1332B112069; Fri, 27 Sep 2019 23:41:59 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DCD9D112063; Fri, 27 Sep 2019 23:41:03 +0000 (GMT) Received: from LeoBras.aus.stglabs.ibm.com (unknown [9.18.235.58]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 27 Sep 2019 23:41:03 +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 , Allison Randal , Thomas Gleixner , Ganesh Goudar , Mike Rapoport , YueHaibing , Greg Kroah-Hartman , Ira Weiny , Jason Gunthorpe , John Hubbard , Keith Busch Subject: [PATCH v4 11/11] powerpc/mm/book3s64/pgtable: Uses counting method to skip serializing Date: Fri, 27 Sep 2019 20:40:08 -0300 Message-Id: <20190927234008.11513-12-leonardo@linux.ibm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190927234008.11513-1-leonardo@linux.ibm.com> References: <20190927234008.11513-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-27_09:,, 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=663 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909270206 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 6ba6195bff1b..27966481f2a6 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