Received: by 2002:a25:b323:0:0:0:0:0 with SMTP id l35csp1793567ybj; Sun, 22 Sep 2019 12:04:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2CzPaO+sLXZ8WxBn2/vxyAqiHAvA8gIEMNPs89tdBy+YxolKbn1hioPTE/jB/ysMCqHvZ X-Received: by 2002:a05:6402:1ade:: with SMTP id ba30mr27412300edb.304.1569179068311; Sun, 22 Sep 2019 12:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569179068; cv=none; d=google.com; s=arc-20160816; b=XBq59XL9Y07k2nPHgWS87mMZztoE3EN92VRa8wgE7/ijcOePStaVYIcKTFuA/BPTDh qxIET+VvB84MEpCK4vNKJRK9i4VJ4nZ4eLALA+nS0uWLjuraop9bj7+q2TSS3L0pFdgV 74pBDLXbCrMfo6ahJL0xrc3FAqTCZfgH7WoAM8u7qPT+uF9GoGRG4lHOLDAlFlYzDhts KKa2wNevAxm4jaZnIK8TXhPBvlXehFjlvhaxocy4mJmCYpuALT1lHhTw2vc0XuA5qn6E XLFXv4hzX1FynDnkNO3vkndGMeoSxVPFG3U0yi1vq6WiPVLpMLmU2ny518CmgPRUD2+d oD3w== 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=DXLW8RKetaNsFbzyD9cmoqGhw+jPFJjTnJP5Bhx7D34=; b=qUehCk7cMGjWQ4uzUDyaIONb+oDRO+EK+UyFagiNONI2pS9ImPsYErTHJsqhrCvgTZ 2lq4Oy34fMiQV+4Y8NsjTyq+227PuXUo7JKXFqlpSaiIVYMxyzhHZnVjdceMRiBxJk3u j3jqLV9YP6YFLM5IB833kYPYImbJlNbVwgEYDLGTrNdt8M6k/bP39FV8YQl9hS8o8PZX oIAHgbidavFoUZt3IUP146DngcBw0u1/1dU31v7TC93znGydVwl+L6dDdyoby1MoucCm BgoRCcE+7u/SizJGcf7g3Zl6p7Kn7x5vvsgTWBl6hjeEtCzS2le9OvxCDLUw7zaLgMXy 6I2g== 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 g8si5216421eda.105.2019.09.22.12.04.04; Sun, 22 Sep 2019 12:04:28 -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 S1729893AbfITTwk (ORCPT + 99 others); Fri, 20 Sep 2019 15:52:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:64930 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726215AbfITTwi (ORCPT ); Fri, 20 Sep 2019 15:52:38 -0400 Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x8KJltD0113598; Fri, 20 Sep 2019 15:52:12 -0400 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2v4sh5q5rg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Sep 2019 15:52:12 -0400 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.27/8.16.0.27) with SMTP id x8KJlxCt113727; Fri, 20 Sep 2019 15:52:10 -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 2v4sh5q5qu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Sep 2019 15:52:10 -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 x8KJoHuv002198; Fri, 20 Sep 2019 19:52:09 GMT Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by ppma03dal.us.ibm.com with ESMTP id 2v3vbuvu81-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 20 Sep 2019 19:52:09 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x8KJq79n61145468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 20 Sep 2019 19:52:07 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 47CBB7805C; Fri, 20 Sep 2019 19:52:07 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B02567805E; Fri, 20 Sep 2019 19:52:02 +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:02 +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 10/11] powerpc/book3s_64: Enables counting method to monitor lockless pgtbl walk Date: Fri, 20 Sep 2019 16:50:46 -0300 Message-Id: <20190920195047.7703-11-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=999 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 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 06a6a5344770..7a8813dfaee9 100644 --- a/arch/powerpc/include/asm/book3s/64/pgtable.h +++ b/arch/powerpc/include/asm/book3s/64/pgtable.h @@ -1391,5 +1391,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