From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E80BCC4828D for ; Sat, 3 Feb 2024 09:24:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D94D06B006E; Sat, 3 Feb 2024 04:24:38 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D1B886B0071; Sat, 3 Feb 2024 04:24:38 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BBC886B0072; Sat, 3 Feb 2024 04:24:38 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id A6A7F6B006E for ; Sat, 3 Feb 2024 04:24:38 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 7336CA1B2A for ; Sat, 3 Feb 2024 09:24:38 +0000 (UTC) X-FDA: 81749957436.17.62031F2 Received: from wp530.webpack.hosteurope.de (wp530.webpack.hosteurope.de [80.237.130.52]) by imf21.hostedemail.com (Postfix) with ESMTP id 836D51C000B for ; Sat, 3 Feb 2024 09:24:36 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf21.hostedemail.com: domain of regressions@leemhuis.info designates 80.237.130.52 as permitted sender) smtp.mailfrom=regressions@leemhuis.info ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706952276; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g2CgHBOzTJbFlAKTQXg1WL2KK9oVV89TerzEy4yduHs=; b=xPjYY3+fdNKjIvu9TXAFcESyiVmQYMEuFCjV8bTC3y5bpToPoes+M4pYm7LsQq90WIYj5d a2SRj3hcZGU5jLthwoFBppj9Pr5NCFd8tnjHdWra2Gi+n+UHsX7ohFFbeRgnJWylgDBOv2 XSgy1BWT5MAIsMwTQMv+7XS2OWyCehU= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf21.hostedemail.com: domain of regressions@leemhuis.info designates 80.237.130.52 as permitted sender) smtp.mailfrom=regressions@leemhuis.info ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706952276; a=rsa-sha256; cv=none; b=eN7w2bdizolpKStcctWvrl7gi9iJ6aZw5dME+kfAMvBcu7ypSjWTZw1UkmDjgSDHW1QBLK hASDX/DjyuX2vlN6fho+Otl2nH7BO8LVvo/F6gw8K/Ap8HnSME9puafbTPRV+/CqrBwuPp NQE/Ajz3e90pN34cwFAL0uNfhrSZYNI= Received: from [2a02:8108:8980:2478:8cde:aa2c:f324:937e]; authenticated by wp530.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1rWCG4-0001ZP-Tq; Sat, 03 Feb 2024 10:24:21 +0100 Message-ID: Date: Sat, 3 Feb 2024 10:24:20 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] mm: huge_memory: don't force huge page alignment on 32 bit Content-Language: en-US, de-DE To: Yang Shi , jirislaby@kernel.org, surenb@google.com, riel@surriel.com, willy@infradead.org, cl@linux.com, akpm@linux-foundation.org, Linux kernel regressions list Cc: yang@os.amperecomputing.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20240118133504.2910955-1-shy828301@gmail.com> From: Thorsten Leemhuis In-Reply-To: <20240118133504.2910955-1-shy828301@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;regressions@leemhuis.info;1706952276;cc7e4dfc; X-HE-SMSGID: 1rWCG4-0001ZP-Tq X-Rspamd-Queue-Id: 836D51C000B X-Rspam-User: X-Rspamd-Server: rspam05 X-Stat-Signature: 4xwaotceg7oqumza4o4b1xr4usjtsrua X-HE-Tag: 1706952276-393543 X-HE-Meta: U2FsdGVkX18y5OKfeuFkh34MNvQi1M6aVuM2/ufeLxuceHoDJpAo3UkUUHvwdHrA+RNQslWJ1GFRaIU4jLqqSkyenPxzvdHPktAOLXGxe1runmbJ7CMK/EyWAuHnRWQXP/qxenULGZbwXhc56++NwDUITBdVHmZRsOnGR/W1aZ0q39559eVRbq0VFGrpBYJoGIXtpNx49F/PQGfirGv+CgEapTf/UytKkTBR7TMakWdcE8ZiH4v9GpbsHdUW7/PqW5xwQqGIKwFaMBorvZD4T30Y0hgRq4HJ/oMgdd8BSo/Hiv1Rn9CRxNOWlc1nqgFbnilGR6u7ygM5XGXuUjxMcaWsBJznwTJK6yZMPQkuUAjs8da20ZHzGaqRSAC/NFLxQ5B+Os0kK3NHt3gAaB6k9xwOIQ9bAltPnSSGY/MYklqKVk8cM6AUxIqJcRrIqN4jugEfENfqT433ypfnNQz03Q8VT7hNLAA4iVIEZy6L2Sa9w91InKGR0Bi2cKZwDkUp1RphmQB7Li5LJUu3rCRS6lDbN/gz5cfDfcUwGfUqIOEG0+jRz+qEslYGSnWb+6FjnLubtspgkjiaSVL/plckbGdKM8O5hjHimUeGpDa/IgAjG58PjuWb8wNfJFjPp6Al1kJuptoBhll2CkyV6s8s/uTMTXsMk0NmFtydUgZLxcMRk+VSZCkIdoPyMJA8vCePOOrQlvB9h9vSVrtBG7DSmVE/WhBxMOvhxxwM7xabWA+QBDnTvaQCCrbwgAJqR0YDvo1C+mjlVhPaQxCuWqBj6ZO3uOzYAffE/5BqyiWLBg7f0GL3sNGLOZnJS50nQ/JKxDfn8p4C5CbMDwmv9LWL1Uj7ksMEiU3XoBLLckw5KEcWqbSmLXrrheTQLrzfYa6w8VXFviSvTPo2HSlHaW+eYDTHA3TLCYfW/0BPn69/gMiqsiRIiT/a80+1xMFFlSIGRDSk5/OmfNTxjWrgRB4 awWsiLWM ht699veiBhpoGtPHukk0e/V6Eu5f8Tabyz+dKGxuEikZO5wDkAF528MU4LIAgJ58u+REAEQVivl06htRcfu9DQbBu2yVYjhWJcWD9mrpHc/g1i9bqd7QhWKwf7OzOdmGwTZjdKlLhr5BWaC/CC95gw3qGwYkXKc+HJVtP4MCpV2onhIKHOHSZnhrN1gDL5Amdt5noDcTExjvjexHodCGecUbRAHhE2GpkFy7h4hUbMkLNVaDJsK9lezRI4k9SLoi3E5xG1ll05W2ZhYiPnFahgPnMysJNKk0g8Czfe+ZHyzoxLpLBNDp6YaIWnbPj+bZn4gFfvRN/Pb6CshsGEaHFpmrWUcs8gs6zayF9bocZKhshk1shDARpcigL0BcFkFwW2g/R9XaLsC6YKatxv8SI9LQpi2+qdpdmgi9Ncv3tm/xhk4ygAGUB4oyU4RWA4PPq2/r/5wCfJkTBjuOSRjE4pWEdpQcrH8VrjJ9CIHGqciXhYIXEgfN7cC7Nt8+kY1lgP6EvxcNHosSK5LP/va/l2C7GLIxw7TPnmmVNYg6fYcbqz1rVVfEdKQuLS5afTqXBVBz4+3KEEMW1Qdf7+2OyIb9z8QFX97n2TfPQUZF+WjdgkMyPwUK8QpiqoA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On 18.01.24 14:35, Yang Shi wrote: > From: Yang Shi > > The commit efa7df3e3bb5 ("mm: align larger anonymous mappings on THP > boundaries") caused two issues [1] [2] reported on 32 bit system or compat > userspace. > > It doesn't make too much sense to force huge page alignment on 32 bit > system due to the constrained virtual address space. > > [1] https://lore.kernel.org/linux-mm/CAHbLzkqa1SCBA10yjWTtA2mKCsoK5+M1BthSDL8ROvUq2XxZMw@mail.gmail.com/T/#mf211643a0427f8d6495b5b53f8132f453d60ab95 > [2] https://lore.kernel.org/linux-mm/CAHbLzkqa1SCBA10yjWTtA2mKCsoK5+M1BthSDL8ROvUq2XxZMw@mail.gmail.com/T/#me93dff2ccbd9902c3e395e1c022fb454e48ecb1d [FWIW, this is now 4ef9ad19e17676 ("mm: huge_memory: don't force huge page alignment on 32 bit") in mainline] Quick question: it it okay to ask Greg to pick this up for linux-6.7.y series? I'm wondering because Jiri's report ([1] in above quote) sounded like this is something that will affect and annoy quite a few people with the linux-6.7.y. Ciao, Thorsten > Fixes: efa7df3e3bb5 ("mm: align larger anonymous mappings on THP boundaries") > Reported-by: Jiri Slaby > Reported-by: Suren Baghdasaryan > Tested-by: Jiri Slaby > Tested-by: Suren Baghdasaryan > Cc: Rik van Riel > Cc: Matthew Wilcox > Cc: Christopher Lameter > Signed-off-by: Yang Shi > --- > mm/huge_memory.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 94ef5c02b459..e9fbaccbe0c0 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -37,6 +37,7 @@ > #include > #include > #include > +#include > > #include > #include > @@ -811,6 +812,14 @@ static unsigned long __thp_get_unmapped_area(struct file *filp, > loff_t off_align = round_up(off, size); > unsigned long len_pad, ret; > > + /* > + * It doesn't make too much sense to froce huge page alignment on > + * 32 bit system or compat userspace due to the contrained virtual > + * address space and address entropy. > + */ > + if (IS_ENABLED(CONFIG_32BIT) || in_compat_syscall()) > + return 0; > + > if (off_end <= off_align || (off_end - off_align) < size) > return 0; >