Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2696983pxj; Mon, 10 May 2021 08:45:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+J/jVVGBHuvU8X0MuGJTH1WBwpo/4hsRFxuv1AQhOkW6C8SGJ7jaGziJHGsTxfbWNmJDJ X-Received: by 2002:a05:6638:29a:: with SMTP id c26mr22348263jaq.135.1620661531862; Mon, 10 May 2021 08:45:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620661531; cv=none; d=google.com; s=arc-20160816; b=L1nqyn08073lfBmbbI8Qggv5v4HC+R4x6YAT9HfXMZeTpsMMb1O6JjUKQjWFV3OO1k OFThZ+X9GIvQoleuIX6k92QlmF4VMdTYza9pVQOjDWtUTsi2A2JFQufJO9KB+8impNtB +eEhR+go0rGUmQ4jm+T0a/svncDBMnHz7kowlkokv2u/9tn6aj5eAir+IC8MYD/074mG 2WdCH4UANgSAJjb5MSYSnvZ5uvhKNKzE/ewZX0WPaTkrYW97lYHaHLz3Uyttbn7YdZ42 hZsAqHepVX2dDVcfUWweVagjrDTq5p7D4IocX6nx1qg1hJfJtHz+M8PhahycSdzls09M JDpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=iYoY5hGjUhvzZ9+0V/rB0XcYWowH/IvHJVBcjLkBRYg=; b=vnS7RkiRiljXrvt4Sb3ndp1gqGTP5BjJ5sR379UprGW3LBcYrPDzaUcOAeWOVR7tVv 9+62Tl6E3VDy+y0BHrY/F/wqTP1Q1o/khILM2aGR6r+rxmWA9bmy2BSFhnuBBAL2gDeH TLnJkk8KH5MosF5DuQWCDm2AczZyq9LP8bDNcH8ufG/kD0GUUI3+dVF/MeGZmpNCdlMH kLsJ+8jTrgMJjxrrnIC4wN3/iuqjSVJqNW784CY6kfhZYAubr0rI+4tsziJb3ZE1ZnRn 43rIOctldMsVtrpt50Wv27hmUK/2DdpHuxGO2HFIZZ8hDI9CXfBFbki3rJ5GI+unU85f KevQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u4si12916234jad.12.2021.05.10.08.45.18; Mon, 10 May 2021 08:45:31 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230154AbhEJKRM (ORCPT + 99 others); Mon, 10 May 2021 06:17:12 -0400 Received: from foss.arm.com ([217.140.110.172]:53518 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbhEJKRF (ORCPT ); Mon, 10 May 2021 06:17:05 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CBCCA15BE; Mon, 10 May 2021 03:16:00 -0700 (PDT) Received: from [10.163.77.48] (unknown [10.163.77.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 190423F719; Mon, 10 May 2021 03:15:56 -0700 (PDT) Subject: Re: [PATCH] mm/thp: Make ARCH_ENABLE_SPLIT_PMD_PTLOCK dependent on PGTABLE_LEVELS > 2 To: Oscar Salvador Cc: Peter Zijlstra , 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 References: <1620621345-29176-1-git-send-email-anshuman.khandual@arm.com> <20210510085313.GB5618@worktop.programming.kicks-ass.net> <843e545a-ca0c-6a1e-2ab0-28ccca182400@arm.com> <20210510101006.GB22664@linux> From: Anshuman Khandual Message-ID: Date: Mon, 10 May 2021 15:46:41 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210510101006.GB22664@linux> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/10/21 3:40 PM, Oscar Salvador wrote: > On Mon, May 10, 2021 at 03:36:29PM +0530, Anshuman Khandual wrote: >> >> >> On 5/10/21 2:23 PM, Peter Zijlstra wrote: >>> On Mon, May 10, 2021 at 10:05:45AM +0530, Anshuman Khandual wrote: >>>> - select ARCH_ENABLE_SPLIT_PMD_PTLOCK if X86_64 || X86_PAE >>>> + select ARCH_ENABLE_SPLIT_PMD_PTLOCK if (PGTABLE_LEVELS > 2) && (X86_64 || X86_PAE) >>> >>> It's still very early on a Monday, but IIRC this new condition is >>> identical to the pre-existing one. >> >> Did not get it, could you please elaborate ? > > When using x86_PAE, you must have more than two pgtable levels, right? > And not speaking of x86_64. arch/x86/Kconfig.. config PGTABLE_LEVELS int default 5 if X86_5LEVEL default 4 if X86_64 default 3 if X86_PAE default 2 Both X86_PAE and X86_64 will always have page table levels > 2 ? But regardless, it might be still useful to assert (PGTABLE_LEVELS > 2) before selecting ARCH_ENABLE_SPLIT_PMD_PTLOCK.