Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3025921pxj; Mon, 17 May 2021 15:54:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMmQrUN7RmWO91hDPoW+OvW2BxFEzSMbdbJRX4BLWtgS9Kyp9mNR1kDpV4quWvAoVNpUSN X-Received: by 2002:a05:6638:22b4:: with SMTP id z20mr1915867jas.128.1621292086730; Mon, 17 May 2021 15:54:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621292086; cv=none; d=google.com; s=arc-20160816; b=GDOAunhfPYviZVGTYabhfIFmRaf+/zbkL5rSvfVIzxeVD+5H+XsyQJCpMla4gxvI2v pZ8cWawK6uzjs12Gn3ar/idEG9tkKO8PPo+zLdiciwgC4LyOqGOteq+ISoplbgkcFMOK kRyXsZ09EHZiPN3f7g2pOk5F0C9NpdUjX07ph1oWSEguK6mkxc8OIPOuXyV7Do4xgvNf PFDgqj0HbV7GEBDVhLJtpIqC3OD3a6alBS0JGDMo131MiYOwEVSfwvCJKx9oVbFefupk UUzOcO+FEq1jrse6mwN6sdDYYRVG2If0xLTxNZo5y9NgVkAiQjKvRtSRUPFj4LLiGL80 BIvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=ebyIfh4yS14SLNJP5JJjMQ4sEbw+CyRszK2yft5ksa0=; b=uNapzYYmmGdzOdItsuRF1oEl3Q4gSeA9LATMT1cj/nFdPNG+rLmR4gdg2C2WoC5n1t iJoJdL9iqhqArODyhrcHBmtihLSCgvj7XwFuul2DaW6gbWNZwHWsfdlpAOSOKKdoF3Cm gyBO9sriXZFzROp4RdW76h84GYlmA1XlkuAfxa+PggFnlQkZjVmYNP6wQLb5W7uOpvrw +XvprN5MO93LnjB32JwUARLBh+kI/HgVBSVkAFN4dRdRmRUFIfbQtsoRsVJnaHSd5qdm +jGRGfUv+OUvK1NfYLAIc0i0nj+Hsg3rDeFZEtJ1wClQivitjnH/6zzA+ZIzb7fdzRqK 1ZGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=qikkEGYm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si18954541jas.106.2021.05.17.15.54.33; Mon, 17 May 2021 15:54:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=qikkEGYm; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239045AbhEQOSH (ORCPT + 99 others); Mon, 17 May 2021 10:18:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:32296 "EHLO mx0b-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234804AbhEQOPc (ORCPT ); Mon, 17 May 2021 10:15:32 -0400 Received: from pps.filterd (m0127361.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 14HE4GJA066666; Mon, 17 May 2021 10:14:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=date : from : to : cc : subject : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pp1; bh=ebyIfh4yS14SLNJP5JJjMQ4sEbw+CyRszK2yft5ksa0=; b=qikkEGYmYjQe0wBAS9SmirAqitGFfpLzSrFDzdVsWMX4OZhK2w9HdZfOTZfB62CsCp3H HFEUD7JMoYfk3fM5akD/GIDNqODHqtC2wR9AInRA/GrfnEVQ1dvGqtB4mJhwFPbGk4xI ljLSJ5KyT1zfC+UyhdrRfyJDHKQJacp2hka7/AGBfdhMUMIbsR7FUGb8/h51uVrmgRzb 5cNt7sH74s8t4yiWY9pxpE19yEbR49d6p6BgjQ4d2vX7y0ce5+T8JNfmCi4wlhUcdAlT X8y9L6Bi3IAe6k5QxkHq+GWa+ct5OCnzBdhvCaXJegl+HPpkhiNvpHCT1hWmR0a8GrMo GA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 38kkmkv5k3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 May 2021 10:14:05 -0400 Received: from m0127361.ppops.net (m0127361.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 14HE4VK0069688; Mon, 17 May 2021 10:14:05 -0400 Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 38kkmkv5hx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 May 2021 10:14:04 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 14HDvuBV016372; Mon, 17 May 2021 14:14:03 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma01fra.de.ibm.com with ESMTP id 38j5x80fg4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 May 2021 14:14:02 +0000 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 14HEE0tW39911900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 May 2021 14:14:00 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E84895204E; Mon, 17 May 2021 14:13:59 +0000 (GMT) Received: from thinkpad (unknown [9.171.54.77]) by d06av21.portsmouth.uk.ibm.com (Postfix) with SMTP id 5B2EE52057; Mon, 17 May 2021 14:13:59 +0000 (GMT) Date: Mon, 17 May 2021 16:13:57 +0200 From: Gerald Schaefer To: Anshuman Khandual Cc: linux-mm@kvack.org, akpm@linux-foundation.org, Heiko Carstens , Vasily Gorbik , Thomas Gleixner , Ingo Molnar , x86@kernel.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/thp: Make ARCH_ENABLE_SPLIT_PMD_PTLOCK dependent on PGTABLE_LEVELS > 2 Message-ID: <20210517161358.49683f34@thinkpad> In-Reply-To: References: <1620621345-29176-1-git-send-email-anshuman.khandual@arm.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: L2wRBfDMFA8ii8uXT3uoCV9jTCk3AtQy X-Proofpoint-ORIG-GUID: 0eDWjaTGdNJmIBb7dSGX-EcdESsB2Vwc X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-05-17_05:2021-05-17,2021-05-17 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=530 priorityscore=1501 adultscore=0 malwarescore=0 impostorscore=0 spamscore=0 mlxscore=0 clxscore=1011 suspectscore=0 lowpriorityscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105170100 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 May 2021 09:45:31 +0530 Anshuman Khandual wrote: > > > On 5/10/21 10:05 AM, Anshuman Khandual wrote: > > ARCH_ENABLE_SPLIT_PMD_PTLOCK is irrelevant unless there are two page table > > levels including PMD (also per Documentation/vm/split_page_table_lock.rst). > > Make this dependency explicit on remaining platforms i.e x86 and s390 where > > ARCH_ENABLE_SPLIT_PMD_PTLOCK is subscribed. For s390, I don't think this makes a lot of sense. We always have 5 levels defined for PGTABLE_LEVELS, and we would not even compile with any other value, because of the "#error CONFIG_PGTABLE_LEVELS" in include/linux/pgtable.h. Our pagetable folding also works a bit different than it does on other archs, and we would actually have pmd level entries for 2-level pagetables, so it should all work fine also with PGTABLE_LEVELS == 2 (if it was possible). In fact, I do not really see why you would need "more than two levels" on any arch, in order to use split PMD locks. Your description also just says "irrelevant unless there are two page table levels", and not "more than two levels", like in Documentation/vm/split_page_table_lock.rst. Yet, your patch adds checks for "more than", so at least the description seems a bit misleading. I assume that the "more than" has to do with folded PMD on a 2-level system, but the way we fold on s390 I do not see why that should be a problem. Could you please elaborate a bit? We also have different levels of pagetables for kernel (CONFIG_PGTABLE_LEVELS) and user processes on s390. The latter can have dynamic levels, currently starting with 3, but previously we also had 2 levels for compat tasks e.g. These dynamic levels for user processes are also independent from the CONFIG_PGTABLE_LEVELS used for the kernel pagetable, while the split PMD lock of course also affects user process pagetables, so that would be another reason not to add such a dependency for ARCH_ENABLE_SPLIT_PMD_PTLOCK on s390.