Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp4108611ybn; Fri, 27 Sep 2019 16:44:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwrhtPZiWbUB3q3HJVTu4AmEvxdd3Tza5XXoyAmKswNfRGa45F3ZCf3qAy57EMus3YwRsjC X-Received: by 2002:a17:906:c4b:: with SMTP id t11mr10010189ejf.131.1569627891993; Fri, 27 Sep 2019 16:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569627891; cv=none; d=google.com; s=arc-20160816; b=qR9lm7mujXIABgkDvU4K6SsaIYuVh21nPxnxOWj2cIDDqlNnBrSS0vD6cgUO2Z9Ole 33z9tmRZ51mmJZegPLk1fpXNUfRxMEPRTts3lW4mSf2R/PZtMoMtlOm9Xhx5jEkAHL3y smTFmsZYIBW+LVoXqxHdB0ph13b0xQL0vyX1pbFUK3ubIZYZnKAdQM7uYXsStrX1c++e 1USBHiaxsdjVwDSFIZy8Q/iE1AJFcal7+ZYSdv8IHpcH+Ya2XEPFiRhrpGavXvQy7QY+ NUlMYU09A6SOC8o1eXE/rzT0v06ySb0TJvvmQl23tJPN6S7rlv8vtzKyxrNoPjrdJ/E8 AQoQ== 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=HETGU1tDhOR8uLcd1xavkwpRt9jjd3UUABMvriZWHViTcuQ+v96dr4AVHReCzpjZkI XuYfWJyOscpXgYbZ42m6YeZfnfJqjuYryD3Faq7ODVF5plKtBSXJtsBY/akTFZyFKPnn RhkQcP8NBX7cceactPJXicxYY4Z4t6Fmxj4qmycVRC0h1Sm1uyk9yNSz4eZs4dXl4h1J SAJKbiDndZtz5Z3nPh0LaQFSo0+NWn1ZtjB0dCai3I4r5BDKEGtUcpZ8dsOP0WW96hO8 QzHuW6dBC2q1fwcJQAX0lgZy1JLWhS5pPYNw087ylt2v0yEu3JzbaLy94YMFueAQYHhq ie2Q== 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 j17si3366881ejd.314.2019.09.27.16.44.27; Fri, 27 Sep 2019 16:44:51 -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 S1728759AbfI0Xln (ORCPT + 99 others); Fri, 27 Sep 2019 19:41:43 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:12776 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728712AbfI0Xlj (ORCPT ); Fri, 27 Sep 2019 19:41:39 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8RNbX0r012541; Fri, 27 Sep 2019 19:41:06 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v9u0p9n89-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2019 19:41:06 -0400 Received: from m0098393.ppops.net (m0098393.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x8RNf5EF017839; Fri, 27 Sep 2019 19:41:05 -0400 Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v9u0p9n7x-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2019 19:41:05 -0400 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id x8RNeO2o023852; Fri, 27 Sep 2019 23:41:04 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma03dal.us.ibm.com with ESMTP id 2v5bg8b72g-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 27 Sep 2019 23:41:04 +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 x8RNf3UT36307346 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 27 Sep 2019 23:41:03 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 990F9112067; Fri, 27 Sep 2019 23:41:03 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC7D4112063; Fri, 27 Sep 2019 23:40:59 +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:40:59 +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 10/11] powerpc/book3s_64: Enables counting method to monitor lockless pgtbl walk Date: Fri, 27 Sep 2019 20:40:07 -0300 Message-Id: <20190927234008.11513-11-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=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909270205 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