Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1772922ybn; Thu, 26 Sep 2019 01:54:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwekUfgCKKpTOukPBwgAOY1p6g74qyrQVdjdgCRpOg+JNlXcGYR1RDQasjKBPToTEtGwHFk X-Received: by 2002:a17:906:19d3:: with SMTP id h19mr2072658ejd.121.1569488093005; Thu, 26 Sep 2019 01:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569488092; cv=none; d=google.com; s=arc-20160816; b=Qkjmu20Ga6o2V6O0f8OSPw1P7v9tLut0Trlzba3EUz2YJcJ69IL0/53E1AeUQQJM5g GRIh6oNZX6AKeTxI0kNpJ0pHop2v1FqxRtfq0Ik/XYTxkLZ+TcT/OzvRtUpa05OmQnBP ZPsYDGNBbYPwdRQLX0GQ+Gp7mYxipR6BI529eL0uIydzv1vvZGTz0ZODLlNeFwom/41T 1bBoxDdf05bkePYFppu1DBkjuujMeJlqM9zVEAXOTp7nMj9oWLgNZCwf22qbRDqHRjbB dRfWESOHCC3Wi+MZh/5FzyL2tdx5hSHpneVD1txu028FNryundEZkmDGbZhSEW+uQc28 4gdg== 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=FpFgabc0pTxXqqk+ea2SnonL66iNTtxI9AeILAuDZyg=; b=YahFdi+Ji6d7vgv40tCXLtwj5xgZ6Q0/D/C/6LNoJGBWlcF/rsfsGLMsRvzwUF0S82 cXatURe7uQi8wNU0mR8N7FV7SfcAWxggijjHpH4HQHGO4KDqWwcb4FBLSwSm3ZHBPRhR u8vWKFWo2M7In4XtjXAktXWO7oxT7CZ/8ZL/4ffM0Fb0eE/T0iqUgingBQUHLJOgsJC1 9UG4h2i1d5YKs2Nrl1bBPg2K3Yb7u0g2Wq07w2ZuAlgLvL70CMVTe7wQBwd5T9TwAqDR 34wEVgPmcggzs2c9ZQJBM03wyxmiyIpySZ0a2rr9X2AM+trefesU1C1x6kZ2PbP54umC C/qw== 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 f14si831358edt.92.2019.09.26.01.54.29; Thu, 26 Sep 2019 01:54:52 -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 S2633562AbfIXV0V (ORCPT + 99 others); Tue, 24 Sep 2019 17:26:21 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41272 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2392562AbfIXV0O (ORCPT ); Tue, 24 Sep 2019 17:26:14 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8OLMQvg051496; Tue, 24 Sep 2019 17:25:37 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 2v7r436ftc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Sep 2019 17:25:37 -0400 Received: from m0098414.ppops.net (m0098414.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x8OLMwwf052553; Tue, 24 Sep 2019 17:25:36 -0400 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0b-001b2d01.pphosted.com with ESMTP id 2v7r436ft3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Sep 2019 17:25:36 -0400 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x8OLPapT000741; Tue, 24 Sep 2019 21:25:37 GMT Received: from b03cxnp07029.gho.boulder.ibm.com (b03cxnp07029.gho.boulder.ibm.com [9.17.130.16]) by ppma01wdc.us.ibm.com with ESMTP id 2v5bg701v3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Sep 2019 21:25:36 +0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8OLPYET48038312 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 24 Sep 2019 21:25:34 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7C37EC605B; Tue, 24 Sep 2019 21:25:34 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D72B0C605D; Tue, 24 Sep 2019 21:25:29 +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:29 +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 10/11] powerpc/book3s_64: Enables counting method to monitor lockless pgtbl walk Date: Tue, 24 Sep 2019 18:24:27 -0300 Message-Id: <20190924212427.7734-11-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=999 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 Enables count-based monitoring method for lockless pagetable walks on PowerPC book3s_64. Other architectures/platforms fallback to using generic dummy functions. Signed-off-by: Leonardo Bras --- arch/powerpc/include/asm/book3s/64/pgtable.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/powerpc/include/asm/book3s/64/pgtable.h b/arch/powerpc/include/asm/book3s/64/pgtable.h index 8308f32e9782..eb9b26a4a483 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -1370,5 +1370,10 @@ static inline bool pgd_is_leaf(pgd_t pgd) return !!(pgd_raw(pgd) & cpu_to_be64(_PAGE_PTE)); } +#define __HAVE_ARCH_LOCKLESS_PGTBL_WALK_COUNTER +void start_lockless_pgtbl_walk(struct mm_struct *mm); +void end_lockless_pgtbl_walk(struct mm_struct *mm); +int running_lockless_pgtbl_walk(struct mm_struct *mm); + #endif /* __ASSEMBLY__ */ #endif /* _ASM_POWERPC_BOOK3S_64_PGTABLE_H_ */ -- 2.20.1