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 D73DEC3600B for ; Thu, 27 Mar 2025 17:28:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BF24D28010F; Thu, 27 Mar 2025 13:28:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BA22C2800FF; Thu, 27 Mar 2025 13:28:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A462828010F; Thu, 27 Mar 2025 13:28:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 83DF52800FF for ; Thu, 27 Mar 2025 13:28:46 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 7D5AA58362 for ; Thu, 27 Mar 2025 17:28:47 +0000 (UTC) X-FDA: 83268015894.13.D9A92EE Received: from smtp-fw-80006.amazon.com (smtp-fw-80006.amazon.com [99.78.197.217]) by imf07.hostedemail.com (Postfix) with ESMTP id 4EBCA40012 for ; Thu, 27 Mar 2025 17:28:45 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=amazon.de header.s=amazon201209 header.b=ujqbbeaF; spf=pass (imf07.hostedemail.com: domain of "prvs=174d1e433=ptyadav@amazon.de" designates 99.78.197.217 as permitted sender) smtp.mailfrom="prvs=174d1e433=ptyadav@amazon.de"; dmarc=pass (policy=quarantine) header.from=amazon.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743096525; 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=xSuF/YbxgWCWLj2Pm2m2fnuZ8qcDIDPazYI7pzm5ruM=; b=qzA6l/yh8w3FlJAmmmi24PfEZVHp8g1P4Q7hjX7lVkARVOU8TWSgKRpBYPvajtpFVV5JiR GTlGF0v0GKzqzxbZgULxo3LcwrPiA2hphsXGrHn4Bpg3l1U8L+XIjukJ75mZVFIZL2Y02s b65F14tyQ9ygecq6lIYHrSFhO+luqro= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=amazon.de header.s=amazon201209 header.b=ujqbbeaF; spf=pass (imf07.hostedemail.com: domain of "prvs=174d1e433=ptyadav@amazon.de" designates 99.78.197.217 as permitted sender) smtp.mailfrom="prvs=174d1e433=ptyadav@amazon.de"; dmarc=pass (policy=quarantine) header.from=amazon.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743096525; a=rsa-sha256; cv=none; b=I/btQQhtWuI4KRdpf3vA/tD+Qo8DvqI0NMKtcwk2NiFl+Nyg9nlgI8/uJGyXU4Noy55zpN ovVSb9vWRw3WhDc+G1oTKPue2cT4jbLOLLOROortgNxLEE8SZgfex5VZDsNWj03rKpGwPY /9DXxVwpoyKLjoT3GN3ABLW5Cbe40Io= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1743096526; x=1774632526; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=xSuF/YbxgWCWLj2Pm2m2fnuZ8qcDIDPazYI7pzm5ruM=; b=ujqbbeaFdbH+I9wysye93Vv/2iM3dOaCe1NzWwbhEKGwnP3nerNDwFoX Obw+fGpBxUlndqE0fxt72tQqmvv1/oT2RUYQcGG+JwniMHwzdSuqQM715 dT4crGhfacHOp5mT5i7ZOzAG7Na7kXDYer9tgf41vf7yW5MJGKpc2WylM A=; X-IronPort-AV: E=Sophos;i="6.14,281,1736812800"; d="scan'208";a="35764312" Received: from pdx4-co-svc-p1-lb2-vlan3.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.25.36.214]) by smtp-border-fw-80006.pdx80.corp.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2025 17:28:43 +0000 Received: from EX19MTAUWC001.ant.amazon.com [10.0.38.20:63978] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.62.254:2525] with esmtp (Farcaster) id 5fc1b816-d2cf-4e8d-a1ff-9170cc525ffa; Thu, 27 Mar 2025 17:28:42 +0000 (UTC) X-Farcaster-Flow-ID: 5fc1b816-d2cf-4e8d-a1ff-9170cc525ffa Received: from EX19D020UWC001.ant.amazon.com (10.13.138.157) by EX19MTAUWC001.ant.amazon.com (10.250.64.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1544.14; Thu, 27 Mar 2025 17:28:41 +0000 Received: from EX19MTAUWA002.ant.amazon.com (10.250.64.202) by EX19D020UWC001.ant.amazon.com (10.13.138.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1544.14; Thu, 27 Mar 2025 17:28:41 +0000 Received: from email-imr-corp-prod-pdx-all-2c-c4413280.us-west-2.amazon.com (10.25.36.210) by mail-relay.amazon.com (10.250.64.203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1544.14 via Frontend Transport; Thu, 27 Mar 2025 17:28:41 +0000 Received: from dev-dsk-ptyadav-1c-43206220.eu-west-1.amazon.com (dev-dsk-ptyadav-1c-43206220.eu-west-1.amazon.com [172.19.91.144]) by email-imr-corp-prod-pdx-all-2c-c4413280.us-west-2.amazon.com (Postfix) with ESMTP id 3538AA04D5; Thu, 27 Mar 2025 17:28:41 +0000 (UTC) Received: by dev-dsk-ptyadav-1c-43206220.eu-west-1.amazon.com (Postfix, from userid 23027615) id BF36651B7; Thu, 27 Mar 2025 17:28:40 +0000 (UTC) From: Pratyush Yadav To: Jason Gunthorpe CC: Changyuan Lyu , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v5 09/16] kexec: enable KHO support for memory preservation In-Reply-To: References: <20250320015551.2157511-1-changyuanl@google.com> <20250320015551.2157511-10-changyuanl@google.com> Date: Thu, 27 Mar 2025 17:28:40 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4EBCA40012 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: shmx5zdfd11md9r1tgoynmb5c7jubi3j X-HE-Tag: 1743096525-581114 X-HE-Meta: U2FsdGVkX1/MoQp3NydNv/nZHLHc+zaLn39jqlWZ6gPWWU6Ziby8qCsYWULBEqrvupv6bje1ln90xiMwzoWQSgmY18xvtkuqlrtrUmuvCsY8m9nvpPrb9lQNq2yjkjRlzQb7AveGLVN8KYRFh94DijH//uSGUdrcJZUtO0QuA0blmsnz3rMiV05GtYhy/I69bPO8mk5z+Ir1hSFiS1gX4tP0SVbhQG1KwAXLfMCOtMyR4ADzKfrhUxR2ELDMX6R9lqP6OLyo119bmcyFGYtwPZ1UBvT1VuB3Or9QJ6uan4vdEcDREIE+sp7eH08AKqDvHh2sNiSS5TzbX/Gxa2tNUkEfftB1mVJCy6yfBU4ajh5pBqWT2Fl+u5RGTQs8kyooZ0ZKQU/T99Vkg9o3g8b1Y3PHi+ZfPKQ3fl4MEQxEzoQOFA1EZ1wigPoLipqoLMDiLpk1Rhj+kJCJM+VsH0Puz/qKG9/I4vLML58WWoC7zkLXVAimAVyBdpS/YR5PyG7Bg9bi5H1vexrS6pkQ4wPFN9A2yHipk0Q/MN+RgByHEbSCAtsVc11WNou7cGr6wnAfSLjMyJRsNx1kctHtQp5ltg1OErqeT9YG+Zktpm7hW+tp62zqgd0CT16GBX4FwCEydPUpffDG7y0HS+a65b1hoLPGWzRtE3ZgdtBhJGXE4e8H3ENum+lKun0+Q9QFGg4KR9VMNcAf/S6Zc4nqONo980f4FnEVsRAPBHBy4SQAx8ma1h8bBj6iS9gQJsO+oZHM+SrK+PWaoG9GqKdK2r/udsm882qYWcgLnRKzr/67UKDp/2fSV/eD3B5KUpAqW4Wuv7tjKgIXUKileavT4d06TaHWwajAFaKj9zXnRtB1m/fpsw0olcYRKwTn1a9314sdmhVaEBsGcn1iqnrLvyvsJNQXKqTJH+L0gQacoJeh0jWq2vvHpIeJu1GobJnLmNslw9TEsKT+K0Lrd8IQ2// hlR69CHx kuk2Cecd2hY7BinYtVk6kPX6SYBJCGW7ADDyezg/1w0GxDRH0/9gt58xidbiplMa0rG2FHIXtGup9JEjLp5SeRKELvWiBF4TB+N0l3foodWFiMF7gc7OygDMci6anEGcO/v9OQy4ZinZN/h0q31TCc0W3DTWOtBhrl6zg/iON8uIK4Y4EiXP1rnybZ8u2KlnZBa4tY9w/UejJUx+o0JqVRAVzGwxxpR8TUaLyYv/svLa/hK2POrPHihep0e8MqaUehK74YZmbaUO8BZVR86iw29lshV6KpzS0LO2g3KGBpoSuPSYKkLBEvNLLLkhJGlp2B9dhhgC1e3+UuIY7JyYgZzU8n+IhwP+XCRZkfif7u9XfIURxEcB+C14LoHO3+7YJdw3m3t7+SusqRXBPziLOFUvNvW25lm+IO34mbQ/6RgsJP9s= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000323, 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 Thu, Mar 27 2025, Jason Gunthorpe wrote: > On Thu, Mar 27, 2025 at 10:03:17AM +0000, Pratyush Yadav wrote: > >> Of course, with the current linked list structure, this cannot work. But >> I don't see why we need to have it. I think having a page-table like >> structure would be better -- only instead of having PTEs at the lowest >> levels, you have the bitmap. > > Yes, but there is a trade off here of what I could write in 30 mins > and what is maximally possible :) The xarray is providing a page table > implementation in a library form. > > I think this whole thing can be optimized, especially the > memblock_reserve side, but the idea here is to get started and once we > have some data on what the actual preservation workload is then > someone can optimize this. > > Otherwise we are going to be spending months just polishing this one > patch without any actual data on where the performance issues and hot > spots actually are. The memblock_reserve side we can optimize later, I agree. But the memory preservation format is ABI and I think that is worth spending a little more time on. And I don't think it should be that much more complex than the current format. I want to hack around with it, so I'll give it a try over the next few days and see what I can come up with. -- Regards, Pratyush Yadav