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 5824AC28B30 for ; Thu, 20 Mar 2025 05:38:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A976F280002; Thu, 20 Mar 2025 01:38:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A43B7280001; Thu, 20 Mar 2025 01:38:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E493280002; Thu, 20 Mar 2025 01:38:21 -0400 (EDT) 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 6E111280001 for ; Thu, 20 Mar 2025 01:38:21 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id F07A5AAAB5 for ; Thu, 20 Mar 2025 05:38:21 +0000 (UTC) X-FDA: 83240824002.30.F488ED8 Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf07.hostedemail.com (Postfix) with ESMTP id CCD7B40007 for ; Thu, 20 Mar 2025 05:38:19 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=fuMNo4sN; spf=pass (imf07.hostedemail.com: domain of pratyush@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=pratyush@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1742449099; 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:dkim-signature; bh=i4DroqneBG6x0AD5NkBo68XH9/ZkMAi74MRpFzbuPbA=; b=feajr9mGlzHvbi4cqeXLiSiiQpLYX7WOZKTRyJGI1P9DjEUXj/6a6FxgB8x89aHaXEz+wJ E+HfPVqcdDkJ4E13g4n0Nc2t4IidQPReB81IJ7F3DQ5Zg+gJ/VaJ02DpcnbZtzIOOPICEr 4ZAfuBhn8zdEzaIbZXFz53HeEUvfwH0= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=fuMNo4sN; spf=pass (imf07.hostedemail.com: domain of pratyush@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=pratyush@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1742449099; a=rsa-sha256; cv=none; b=2jVdjW7HItF6If20WJpEY8z6+h7sX1bKB6jrvHADIZxVacu/kNtQrdfd2PiMZokK9o/E2Y +Q2Xmlsf0t6d0dg3Tt3KP8l569DurVZ6mJPpjM2yazRqakAxzDG+SmnRLaRVEG3dBLFk9J cuV2t6DobG6ik1qzKzXr/JXK2Y6NOEs= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 5FB73A48F7C; Thu, 20 Mar 2025 05:32:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD575C4CEDD; Thu, 20 Mar 2025 05:38:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1742449098; bh=NQpmUMJVyMyFJpKpG5jMIUbPPQhrRkv3l6n2VcE0EUg=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=fuMNo4sNK9rhmK+emalGQ6LXJk0BvGUhlA+tpCOWs9uNaHCOVaqQgbYFz0NLLgdlp aAV9LjSUwTiji7kc13eE91Xk1LgTrGMChLjL3VKl5uXggr9wkmTIAASEsexsTeXQTo hgyaGgEFm3B/LdGBy4FdSRAM8UxBjBOYC0t9ObIBbMaGLje7prvIQSdPGMoNLyaVyz njn4Km2JW7uFIMW5csKuRKRQ4XTnxUegzEj7m8jRpFX13pT6Q4gahNXo21WmTN/ss5 XmjNPrw3/ldi8geuBfhZv573ycrN5nPvkAzFfBjxLcybFsfqRhBiQ9WVhmJzG503Et TV1QD7SwzHqvQ== Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfauth.phl.internal (Postfix) with ESMTP id C4767120006F; Thu, 20 Mar 2025 01:38:16 -0400 (EDT) Received: from phl-imap-12 ([10.202.2.86]) by phl-compute-04.internal (MEProxy); Thu, 20 Mar 2025 01:38:16 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeejfeelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgfgsehtjeertder tddtnecuhfhrohhmpedfrfhrrghthihushhhucgjrggurghvfdcuoehprhgrthihuhhshh eskhgvrhhnvghlrdhorhhgqeenucggtffrrghtthgvrhhnpedtleelvdejtdeiudfhtdev feeujefhgfetleeifeffleevtedtgeevkeehhfeludenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmvgdomhgvshhmthhprghuthhhphgvrhhs ohhnrghlihhthidqudegjeefudejtddtkedqfedtvdelkeefiedtqdhprhgrthihuhhshh eppehkvghrnhgvlhdrohhrgheshigruggrvhhprhgrthihuhhshhdrtghomhdpnhgspghr tghpthhtohepudekpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegufihmfiesrg hmrgiiohhnrdgtohdruhhkpdhrtghpthhtohepghhrrghfsegrmhgriihonhdrtghomhdp rhgtphhtthhopehjghhofigrnhhssegrmhgriihonhdrtghomhdprhgtphhtthhopehprg hnkhgrjhdrghhuphhtrgdrlhhinhhugiesghhmrghilhdrtghomhdprhgtphhtthhopehf vhgulhesghhoohhglhgvrdgtohhmpdhrtghpthhtohepjhhunhgrihgushesghhoohhglh gvrdgtohhmpdhrtghpthhtoheprhhivghnthhjvghssehgohhoghhlvgdrtghomhdprhgt phhtthhopehtrghtrghshhhinhesghhoohhglhgvrdgtohhmpdhrtghpthhtohepvhgrnh hnrghpuhhrvhgvsehgohhoghhlvgdrtghomh X-ME-Proxy: Feedback-ID: id4c94969:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 951301C20066; Thu, 20 Mar 2025 01:38:16 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 X-ThreadId: Tb8cb476dfbc5618c Date: Thu, 20 Mar 2025 09:37:56 +0400 From: "Pratyush Yadav" To: "Jason Gunthorpe" , "David Rientjes" Cc: "Alexander Graf" , "Anthony Yznaga" , "Dave Hansen" , "David Hildenbrand" , "Frank van der Linden" , "James Gowans" , "Junaid Shahid" , "Matthew Wilcox" , "Mike Rapoport" , "Pankaj Gupta" , "Pasha Tatashin" , "Vipin Sharma" , "Vishal Annapurve" , "Woodhouse, David" , linux-mm@kvack.org, kexec@lists.infradead.org Message-Id: <755e80a2-60a7-4a04-9eb2-714e89ea34c5@app.fastmail.com> In-Reply-To: <20250317172255.GO9311@nvidia.com> References: <20250317172255.GO9311@nvidia.com> Subject: Re: [Hypervisor Live Update] Notes from March 10, 2025 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Queue-Id: CCD7B40007 X-Rspamd-Server: rspam08 X-Stat-Signature: nf3rp9i5ab4p68ioprbg79t164s9y3mp X-HE-Tag: 1742449099-105533 X-HE-Meta: U2FsdGVkX1+MULE4UDzFkmqi6gpr9M5IMO8ogj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gtl5vB7dV5QrsGU4jozfV/eT4iNzAnMm3nZyC6uhDDGMGD26cfIEj3/Q+mq+oxtkBfL8M1f3hBrlTPxEqik6Yic+Fislp49kfXiPTULrrzZcfC9LQgp8NLAs4V4H4hwDJk7PTVOZOi7U0dc= 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: Writing this from my phone so apologies in advance if it messes up formatting somewhere. On Mon, Mar 17, 2025, at 9:22 PM, Jason Gunthorpe wrote: > On Sun, Mar 16, 2025 at 08:52:43PM -0700, David Rientjes wrote: [...] >> Pratyush noted there was no way to preserve folio orders in KHO and he >> also noted there was a need for page flags. > > I think the xarray idea will preserve folio orders, that was a big > point of it. > > Not clear why we'd need to preserve page flags. The same page flags > may not even exist in the new kernel? New kernel should set the page > flags correctly based on what it is doing. Shouldn't, say, memfd know > exactly what it's page flags should be in the new kernel when adopting > the memory? I didn't mean the exact flags value, but the ability to have per-folio flags. The exact bits and their meaning would of course need to be part of the ABI. Shmem uses the dirty and uptodate flags to track some state on the folios, and the flags can affect it's behavior (lazily zeroing out falloc-ed pages for example). I am assuming other FD types or drivers might also want to store per-folio information. Having KHO core provide this facility can avoid duplicating the logic in each subsystem. That said, I don't think this is a blocking feature that should be present from the get go. I would be happy if it is, since that would make the shmem flag tracking easy, but for now I can have a separate property to track this. > >> Pasha asked how cgroups would be handled, but there was no current >> support for that. Pratyush said the current RFC focused on anon memfd >> and has not yet looked at hugetlb. Pasha emphasized the importance of >> focusing on one type of memory to start. > > I'd say userspace should deal with this. It should de-serialize the FD > within the context of the cgroup it wants to charge that FD too, and > the de-serializing process should charge that cgroups accounting with > whatever is restored inside the FD. > > Is that possible? For FDBox, it is certainly possible. In the current patch version, deserialization happens on boot so it can't be done, but in later versions I want to give userspace control on when to deserialize. So whichever context triggers that gets charged. [...] -- Regards, Pratyush Yadav