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 C1A74E77182 for ; Fri, 13 Dec 2024 17:08:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2555F6B00A3; Fri, 13 Dec 2024 12:08:39 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2059B6B00A5; Fri, 13 Dec 2024 12:08:39 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0806B6B00A6; Fri, 13 Dec 2024 12:08:39 -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 D21696B00A3 for ; Fri, 13 Dec 2024 12:08:38 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 73D621C598E for ; Fri, 13 Dec 2024 17:08:38 +0000 (UTC) X-FDA: 82890568698.08.E9EA1F7 Received: from mail-ed1-f48.google.com (mail-ed1-f48.google.com [209.85.208.48]) by imf20.hostedemail.com (Postfix) with ESMTP id 7811F1C001F for ; Fri, 13 Dec 2024 17:08:09 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=3vxlCZlR; spf=pass (imf20.hostedemail.com: domain of kaleshsingh@google.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=kaleshsingh@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734109689; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=7A4zwHQX+g8AxxOfbgXufhzVAB4FWsc6ZChZM+91J+Q=; b=N4Wcow0HBy0MMXWBKezWBzVHebpEzJ315LvF4ex+6v2DOe0b1SAljEmKti30uD0igvVu7i El3GEWf7HYc7Z48ILeBonFK6ZGSyqmgFMDEBykn0/ps4sOAFpHbdl6qXuKuPgZPoTMw4xd /y9T+jZ6aEW6ZHGJxjm55gVfqu1cckI= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=3vxlCZlR; spf=pass (imf20.hostedemail.com: domain of kaleshsingh@google.com designates 209.85.208.48 as permitted sender) smtp.mailfrom=kaleshsingh@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734109689; a=rsa-sha256; cv=none; b=0XLo8xb+1BjiJgMDiLggOQbjKy2O/um0VKi8tCvjtdvzbV09p/zVJjOv+LcDMOwDqEkayS 5FIUiu7m/lFXrVnoX7wmG7KgxP8w9Toyhb8pfNsQsSvYbdEWzcWlD8t16+C2i+Ofekr8Mv qOPCejXlZfNw8x7OhzD98jOCr6oHe0Y= Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5d442f9d285so9585a12.1 for ; Fri, 13 Dec 2024 09:08:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1734109715; x=1734714515; darn=kvack.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7A4zwHQX+g8AxxOfbgXufhzVAB4FWsc6ZChZM+91J+Q=; b=3vxlCZlRUqa1QTBXs4IXmu1/ZiJ4gXV476wkdr+23ziWeTqnlq7sQ6R6uCPWPuNNoc mvBvHIGbudGp6SEYJA4XYMxR7ujLFGs0dUZXJVlz3HUskqFGkdZSEgP1UJPAiKapoHzJ tbVxTQ4CHpY3+nOQ97MpqgDJXb2kOeSBY2DY0kAyqIwNbga80vNflG60mMMKiJBWcrL1 lMERvrXez7duhabDBGnvOTmr25WW9SuiljHaN1KnP7svwxRYyQEKbnZ8tvPLzjv9aAcu pEV9jbRc7pV94WDTuVqA7TGK0nyW2P7iuDAc5/GyW9GXyQE2fcpeH+R2J8uSEwFhj7HM CGDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734109715; x=1734714515; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7A4zwHQX+g8AxxOfbgXufhzVAB4FWsc6ZChZM+91J+Q=; b=rlqNmgeUkcAhvEAnyDUwvhhEipmPCDqdThJ58wr3Pja1q8jVlBQdbmLLN4Gn3lNauH RzK5lzq/fvggpN/eAZKlX+clIez/CpFmGI7rmUBWTnHmrAwUSYYl/+2kZkbY9IbQjri6 yZUShrGKedVz8dTOtjelmqxZ1et+eSPpoc0SftgT67e3lulT82epyJxVbHdQz2hk0Zfs UqqP+gwrLEP5jzPHs/UYQblAXlR2ZLJ0TOApx6S7IquVSDP++R62ocJW3AxR2RsWteOZ ZeX/DFUBMi7H4KeOJ4almdGBPyOgeWnU4ayFmvsC9xyvLv+NU1SGWXw+Xo1lQ8vrLHVP Z0OA== X-Forwarded-Encrypted: i=1; AJvYcCWE9zgAHlBf6H1/9xSzCg5HtyRYVzXzVqV1+SS1E65VBvNmtjcgPPIagUFBAzKCcIIRwyDyKe5cCA==@kvack.org X-Gm-Message-State: AOJu0YxyUDTv+e/Y2lbQ3ejg3vPFt7Vti3ZuP5m+EB191pKSCKehtk3c S5o8Qnz4MoaGPC1gFhSCJ4PmwIHmiq2Qn9BDWFH3tB5O2TVF8n9C6hwO5Fb76RAs7VFZ4TbdPOG 6tHhBK+WXBk7Se/EkxBbBjBBqQ5bx6H3yzdkJ X-Gm-Gg: ASbGncvXNZIIrS2ts1DjYWMJjAL9IpzA5wgJHa9HYJZna5xtPdOZiPxT2xMNUuMk09V jjGnjEMkY4IspsJgme1iNLqF2leqpx0dBThAGjg== X-Google-Smtp-Source: AGHT+IE0pzRAvhpWcDoHVTc25a7VJDPqOoxFfUFUvV3kZNJPG0d3Y6hVFQO+pd+M5jbFDlDiTJn/R0kKY+NzL+UHXcQ= X-Received: by 2002:a05:6402:1517:b0:5d0:b20c:2063 with SMTP id 4fb4d7f45d1cf-5d63c09e36emr92135a12.7.1734109713373; Fri, 13 Dec 2024 09:08:33 -0800 (PST) MIME-Version: 1.0 References: <20241211232754.1583023-1-kaleshsingh@google.com> <1818e2ea-f170-4a9c-8d93-2a24f2755a41@lucifer.local> <20241212173609.afd41d1dffbefe0d731ed4ed@linux-foundation.org> <695eabb8-ba28-4031-bc4d-66dc4f1d096f@lucifer.local> <9675c409-b495-46a5-a90c-c952892b4121@lucifer.local> In-Reply-To: From: Kalesh Singh Date: Fri, 13 Dec 2024 12:08:18 -0500 Message-ID: Subject: Re: [PATCH mm-unstable v2 00/16] mm: Introduce arch_mmap_hint() To: "Liam R. Howlett" , Lorenzo Stoakes , Kalesh Singh , Andrew Morton , 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, Jann Horn Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 7811F1C001F X-Rspam-User: X-Stat-Signature: aqsf7gegoxcrxwy3yeofcppgw6p9qzfb X-HE-Tag: 1734109689-693629 X-HE-Meta: U2FsdGVkX1+lRPZCroFnJH3chOKN+ebdLj98ESxNpcpYBU8ymYgSO1ymMJvB9m5LX/nlW07UddFtnM+UXGkjy+NwfXNfZXmDDW+2V+DlTVxbaq+q+GZBmsmQm2y+xatWElTi+FURdZLIh4nrwFDddmEqt+ItOxE59T+D59FkXryrPrzx0qYAo19oOiH17JQ0VvDzp6qOU1zKEYdofz3wzZroOz6vV8zgertYvLy/plJfu9nsL+cxwZL2LrGUGlzxmbwbwR2iHt2sL8XrN9SkTfHh/p5mWMCz3tcJzP9uSyTS2Mb9UireOwUjIHfFufZvtjrN8FoMJ708pR2CKiokjpBg4njoKZTVtmanNy+wVlIhU7iOLuchZ4qeEanKBFx2oReUI85vNMRAuCRpXQExrv8GVcdY4JpQjcv7WI5E0aPgLKaYqinBdUTXjbRsqQwfsq5yWYc7k7zp1cZUna6gSAZAOfQzBgIQDtKqydWvz0pBkDhq1jnM0N/W4WmsBhw6UntPSPbYegGt0nPRSGgQzPlP06R7kNqudk61lEH7uSqS/vXQcKA+8OQ+7OkaYLlqlEb80tQ5BP+PkCX6VM0GAxSNP9waJvFYa8awNqw/Zf/BfjHEQs0iQWRM3P9BrPTvwvp1p6sqA07aRqFoGcfFW1sTNStYfbdDKwlpGPYWx6UTXt7PFYVKsYx8WAnWGZgsas7yGjYHSumSD5Gu2/FgvWam4579GlNyRkjORoreOm7q0bjpmtUF6d/0U/LxafFZvpE8ewIsaPdtqSE9aUUaUFx0zOztm0XGCCLkW3yM8mtBjDoU0abKw3qfAYvyyYsXc3gPefTJgPpi2k4pvUE9GwzkdcLRVSjbYYq6cbZxc4viqJe7o1HV7MieoHlpNMC93OFlqQ3on02XI72IsBrI16w+CDE1zBqzqLEZIkfs9PYpODZffxGdEhQRxmBDEJuP2cR5j4yDe2ca2WAoyPv ncHziUzs dSCJCfRGFV6T3Zj2lbqKccfPO5ED3Dp17NATFgVcN2D+2cW0lPz1flzC3+/mxNvi6QWKsp3MgW+UzQ60qZoBhouywxq3WMTrPrx+FTc811Kur6KptJTLVjiE5DDlz1pSTIS489Ue8O3Pr7RRLNoq8oo06UMCJsutR7uRVDgrJEfqhfSb9oDTCCxRninWxHMC50OPPze52ki6BSDFwEbp/AyD5bw+uQx3dD+WtFwVqOk1j0n/WROx21Jp78k8aMhGb6+Jlf5C6gkIQuvy7ua8yV2IjbClV6uHfmayc X-Bogosity: Ham, tests=bogofilter, spamicity=0.321908, 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 Fri, Dec 13, 2024 at 11:45=E2=80=AFAM 'Liam R. Howlett' via kernel-team wrote: > > * Lorenzo Stoakes [241213 10:16]: > > On Fri, Dec 13, 2024 at 10:06:55AM -0500, Kalesh Singh wrote: > > > On Fri, Dec 13, 2024 at 4:00=E2=80=AFAM Lorenzo Stoakes > > > wrote: > > ... > > > > > > > On the technical side, Liam is right that the copy-pasted arch code > > > has inconsistencies (missing checks, order of checks, ...). I agree > > > there=E2=80=99s room for further consolidation. I=E2=80=99ll take ano= ther stab at it > > > and resend it as an RFC with an updated cover letter, as Lorenzo and > > > others suggested. > > Thanks. Can you please include what platforms you have tested in your > cover letter (and level of testing - booting, running something, etc). > > If you have not tested them, then it might be worth it to have it as an > RFC to point this out - at least initially. Some of these are very > difficult to set up for testing, but it is also possible that you did > that and the maintainers/people who usually test these things will > assume it's fine if you don't spell out what's going on. > I build-tested most of these except (csky and loongarch) and ran android runtime (ART) tests on arm64 and x86. I can try to spin up a few of the others and will add it to the description. > > > > The most useful thing here as well to help us understand would be to wr= ite > > more in the cover letter to expand on what it is you ultimately what to > > achieve here - it seems like an extension on the existing THP work on a > > per-arch basis (I may be wrong)? So adding more detail would be super > > useful here! :) > > > > We do hope to avoid arch hooks if at all possible explicitly for the re= ason > > that they can be applied at unfortunate times in terms of locking/wheth= er > > the objects in question are fully/partially instantiated, VMA visibilit= y > > etc. etc. based on having had issues in these areas before. > > > > Also if a hook means 'anything' can happen at a certain point, it means= we > > can't make any assumptions about what has/hasn't and have to account fo= r > > anything which seriously complicates things. > > > > Ideally we'd find a means to achieve the same thing while also exposing= us > > as little as possible to what may be mutated. > > > Yes, I'm not sure of what your plans are, but I would like to see all of > these custom functions removed, if at all possible. Initially I think we can remove the mmap hint portion of the logic; and follow up with removing arch_get_unmapped_area[_topdown](). Some of those may not make sense to consolidate e.g. powerpc's slice_get_unmapped_area() which doesn't share much in common with the rest. Thanks, Kalesh > > Thanks, > Liam > > To unsubscribe from this group and stop receiving emails from it, send an= email to kernel-team+unsubscribe@android.com. >