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 4886FE7717F for ; Thu, 12 Dec 2024 22:02:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D2D686B00A9; Thu, 12 Dec 2024 17:02:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C8E316B00AA; Thu, 12 Dec 2024 17:02:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B07756B00AB; Thu, 12 Dec 2024 17:02:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 8DDAE6B00A9 for ; Thu, 12 Dec 2024 17:02:14 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 13A6A1A0988 for ; Thu, 12 Dec 2024 22:02:14 +0000 (UTC) X-FDA: 82887680442.18.0DF7A10 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf30.hostedemail.com (Postfix) with ESMTP id 58AC780019 for ; Thu, 12 Dec 2024 22:01:24 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="vATraj/l"; spf=none (imf30.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734040906; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=nUU3k3ndx8hCjIEVI0vAEW5jsu/OGAg5GP0kOz2LdOQ=; b=kuvTlHdqPtg2A6Mom6mKvovIhVYDbnt7YHzM0TpH25Gm8GYSyZqXbCikkj8bOD2jctrZNB hC8Oej8u0GoONdYiumtkd9Yp6wbL2iexA+qJnPH4iY3F/TKE4ANxtSXS2BRyVlveIM+dQ7 njfyn3xUH/0717/U5SqK9rGJkdvDz7g= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734040906; a=rsa-sha256; cv=none; b=PDTVTsu+izwYQqOpW9cCXD0OBDrWf625RPy0t/uJe5zgYvIsQIGR6glb9Enm3RsBWKPiPZ AkTdcIgQF1uht8gm70beEHeC+V+cv8LHey/uce/ku9KWGl9TW9ZUaMLCDOuczbA1H7nbTz G52pXr4jU0wST4ephLy0RP3BfQehs54= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b="vATraj/l"; spf=none (imf30.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=nUU3k3ndx8hCjIEVI0vAEW5jsu/OGAg5GP0kOz2LdOQ=; b=vATraj/l7BYi45J3o09OIopaxJ C8jNjTPCPsm9QpjuSJ1IY9oPT5mUdBMuSKqTmLPfzVHPEsRg9jIMEmxtX5EH+CBf2Ad5QJkAzCOb0 QIBWWnrVmjlWPROLIj1nnhmGbebpQ72pM/mYvVSSI7b+XJoia4xx6JsI/qmb+lwoDY8J6kpWtw2sy nSq0P9/nMLk51OkHcgu7wfznTwDcJV87JcZ7lYZRgkl/n/cZDkdLwKwkwqCciizJ2Mw/AcIegRxYt kYJ96xWeFCCL6IUF+RLxWDxyxyavltxwOVk9mRXBnRhuepZag1Y3wIlzjK2IUkkHDKONd/95VcvEW bk/ki6/Q==; Received: from willy by casper.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1tLrFA-00000008PIi-3DGS; Thu, 12 Dec 2024 22:01:12 +0000 Date: Thu, 12 Dec 2024 22:01:12 +0000 From: Matthew Wilcox To: Kalesh Singh Cc: akpm@linux-foundation.org, vbabka@suse.cz, yang@os.amperecomputing.com, riel@surriel.com, david@redhat.com, minchan@kernel.org, jyescas@google.com, linux@armlinux.org.uk, tsbogend@alpha.franken.de, James.Bottomley@hansenpartnership.com, ysato@users.sourceforge.jp, dalias@libc.org, glaubitz@physik.fu-berlin.de, davem@davemloft.net, andreas@gaisler.com, tglx@linutronix.de, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, chris@zankel.net, jcmvbkbc@gmail.com, bhelgaas@google.com, jason.andryuk@amd.com, leitao@debian.org, linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org, kernel-team@android.com, android-mm@google.com Subject: Re: [PATCH mm-unstable v2 00/16] mm: Introduce arch_mmap_hint() Message-ID: References: <20241211232754.1583023-1-kaleshsingh@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241211232754.1583023-1-kaleshsingh@google.com> X-Rspamd-Queue-Id: 58AC780019 X-Rspam-User: X-Rspamd-Server: rspam07 X-Stat-Signature: m37m54f3597i6yxbtdhgqikqstzk5ms6 X-HE-Tag: 1734040884-614534 X-HE-Meta: U2FsdGVkX18XvikV+yUQsTsxTH6KtCjaIcxaNjI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mZD28ewunSu0w1uKitntbvwCkUzF/KAQo5qql57nbr2QAf6WYRzBr9K9L1KUoHbMS9PHX9lqet7PJSyggpZtFKc3DzoSvDdGGziYttEZ5p99S+DRAr3MOiUiAZValJR69OjV0/PxYg7x9C0agjCEX3t/a9Rc7b+M45Ff0kBMnbt1Z262CAJaX3sjnPw= 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 Wed, Dec 11, 2024 at 03:27:38PM -0800, Kalesh Singh wrote: > Hi all, > > This is v2 othe the arch_mmap_hint() series. > > Changes in v2: > - MAP_FIXED case is also handled in arch_mmap_hint() since this is just a > special case of the hint addr being "enforced", per Yang Shi. > - Consolidate most of the error handling in arch_mmap_hint(). > - Patch 16 ("mm: Fallback to generic_mmap_hint()") was folded into > Patch 2 ("mm: x86: Introduce arch_mmap_hint()") > > v1: https://lore.kernel.org/r/20241210024119.2488608-1-kaleshsingh@google.com/ > > ======= > > This series introduces arch_mmap_hint() to handle allocating VA space > for the hint address. But why? You're basically forcing me to read the entire series to figure out what you're doing and why. I decline. > Patches 1-16 introduce this new helper and Patch 17 uses it to fix the > issue of mmap hint being ignored in some cases due to THP alignment [1] > > [1] https://lore.kernel.org/r/20241118214650.3667577-1-kaleshsingh@google.com/ > > Thanks, > Kalesh > > > Kalesh Singh (16): > mm: Introduce generic_mmap_hint() > mm: x86: Introduce arch_mmap_hint() > mm: arm: Introduce arch_mmap_hint() > mm: alpha: Introduce arch_mmap_hint() > mm: arc: Use generic_mmap_hint() > mm: csky: Introduce arch_mmap_hint() > mm: loongarch: Introduce arch_mmap_hint() > mm: mips: Introduce arch_align_mmap_hint() > mm: parisc: Introduce arch_align_mmap_hint() > mm: s390: Use generic_mmap_hint() > mm: sh: Introduce arch_mmap_hint() > mm: sparc32: Introduce arch_mmap_hint() > mm: sparc64: Introduce arch_mmap_hint() > mm: xtensa: Introduce arch_mmap_hint() > mm: powerpc: Introduce arch_mmap_hint() > mm: Respect mmap hint before THP alignment if allocation is possible > > arch/alpha/include/asm/pgtable.h | 1 + > arch/alpha/kernel/osf_sys.c | 31 +++--- > arch/arc/include/asm/pgtable.h | 1 + > arch/arc/mm/mmap.c | 43 +++++---- > arch/arm/include/asm/pgtable.h | 1 + > arch/arm/mm/mmap.c | 107 +++++++++------------ > arch/csky/abiv1/inc/abi/pgtable-bits.h | 1 + > arch/csky/abiv1/mmap.c | 68 +++++++------ > arch/loongarch/include/asm/pgtable.h | 1 + > arch/loongarch/mm/mmap.c | 49 +++++----- > arch/mips/include/asm/pgtable.h | 1 + > arch/mips/mm/mmap.c | 50 +++++----- > arch/parisc/include/asm/pgtable.h | 1 + > arch/parisc/kernel/sys_parisc.c | 53 +++++----- > arch/powerpc/include/asm/book3s/64/slice.h | 1 + > arch/powerpc/mm/book3s64/slice.c | 31 ++++++ > arch/s390/include/asm/pgtable.h | 1 + > arch/s390/mm/mmap.c | 51 +++++----- > arch/sh/include/asm/pgtable.h | 1 + > arch/sh/mm/mmap.c | 83 ++++++---------- > arch/sparc/include/asm/pgtable_32.h | 1 + > arch/sparc/include/asm/pgtable_64.h | 1 + > arch/sparc/kernel/sys_sparc_32.c | 33 ++++--- > arch/sparc/kernel/sys_sparc_64.c | 96 +++++++----------- > arch/x86/include/asm/pgtable_64.h | 1 + > arch/x86/kernel/sys_x86_64.c | 64 ++++++------ > arch/xtensa/kernel/syscall.c | 31 ++++-- > include/linux/sched/mm.h | 9 ++ > mm/huge_memory.c | 17 ++-- > mm/mmap.c | 86 +++++++++++------ > 30 files changed, 491 insertions(+), 424 deletions(-) > > -- > 2.47.0.338.g60cca15819-goog > >