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 D3530C28B20 for ; Wed, 2 Apr 2025 16:47:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5263C280006; Wed, 2 Apr 2025 12:47:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4AC97280001; Wed, 2 Apr 2025 12:47:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 326FC280006; Wed, 2 Apr 2025 12:47: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 0EEDE280001 for ; Wed, 2 Apr 2025 12:47:46 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id A6A17802D5 for ; Wed, 2 Apr 2025 16:47:47 +0000 (UTC) X-FDA: 83289685374.28.F9936B5 Received: from smtp-fw-80006.amazon.com (smtp-fw-80006.amazon.com [99.78.197.217]) by imf10.hostedemail.com (Postfix) with ESMTP id 87E6AC0008 for ; Wed, 2 Apr 2025 16:47:45 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=amazon.de header.s=amazon201209 header.b=mjZ2l3oU; spf=pass (imf10.hostedemail.com: domain of "prvs=180aa32b9=ptyadav@amazon.de" designates 99.78.197.217 as permitted sender) smtp.mailfrom="prvs=180aa32b9=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=1743612465; 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=OOFyG8Kd6+HeZN8MQhF4S2SXZyJjo0p9QJnhgx3PboY=; b=ddinO1J4dOqlHe7E+xtX1p0lAg1pgGzUPdlv0UIvYts73GCGs1XxLbe217fInbCO9aMg9v tqrsc5ktlV3BKa6HYbL1C3+PtyrbmNxBgxwqWTHsmqTK0RBr8i6TOd82rBnOq/FBy/nM0O Upd8PUNgXtgrIJHEyZRKl5XA6BYo7fI= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=amazon.de header.s=amazon201209 header.b=mjZ2l3oU; spf=pass (imf10.hostedemail.com: domain of "prvs=180aa32b9=ptyadav@amazon.de" designates 99.78.197.217 as permitted sender) smtp.mailfrom="prvs=180aa32b9=ptyadav@amazon.de"; dmarc=pass (policy=quarantine) header.from=amazon.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743612465; a=rsa-sha256; cv=none; b=Gp28kR7u/9kQmqa/0NY+3Gv6rTG/w2eYoSgvkymdfwMsPWkW9JLA6DYiXV8mfVwPvjf0+B F0BlnxeRzAfKiDlaSirNddatcrep7VfmEQDQT/N36L3oDvri6jekyO6+fGLkorMQ+j97lG DL3Toz3BGg5S+nVek/RpcQMjqUXsXEA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1743612466; x=1775148466; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=OOFyG8Kd6+HeZN8MQhF4S2SXZyJjo0p9QJnhgx3PboY=; b=mjZ2l3oUKtULOdStKON38+YVp4u11StwkKC7tvsEceOj1s1cIFbNwSDa d0OwFjEwMlPjEKg3Fno2qq47qODuiauYtG3aH+tX8OhlMbspPVBFcoiXF inEZ+ZABbS5edIzMHiDX4w+Wa4Jvu8XM7sQbpmQ/3y7CotNugTM1l+x1V 4=; X-IronPort-AV: E=Sophos;i="6.15,182,1739836800"; d="scan'208";a="37483382" 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; 02 Apr 2025 16:47:43 +0000 Received: from EX19MTAUWA002.ant.amazon.com [10.0.38.20:63428] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.57.231:2525] with esmtp (Farcaster) id fb8b30c2-4f1e-48a1-bd68-83c73817fafa; Wed, 2 Apr 2025 16:47:42 +0000 (UTC) X-Farcaster-Flow-ID: fb8b30c2-4f1e-48a1-bd68-83c73817fafa Received: from EX19D020UWA002.ant.amazon.com (10.13.138.222) by EX19MTAUWA002.ant.amazon.com (10.250.64.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1544.14; Wed, 2 Apr 2025 16:47:39 +0000 Received: from EX19MTAUEA001.ant.amazon.com (10.252.134.203) by EX19D020UWA002.ant.amazon.com (10.13.138.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1544.14; Wed, 2 Apr 2025 16:47:39 +0000 Received: from email-imr-corp-prod-pdx-all-2c-785684ef.us-west-2.amazon.com (10.43.8.2) by mail-relay.amazon.com (10.252.134.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1544.14 via Frontend Transport; Wed, 2 Apr 2025 16:47:39 +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-785684ef.us-west-2.amazon.com (Postfix) with ESMTP id A4539A03AB; Wed, 2 Apr 2025 16:47:38 +0000 (UTC) Received: by dev-dsk-ptyadav-1c-43206220.eu-west-1.amazon.com (Postfix, from userid 23027615) id 3863F4F35; Wed, 2 Apr 2025 16:47:38 +0000 (UTC) From: Pratyush Yadav To: Changyuan Lyu CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: Re: [PATCH v5 09/16] kexec: enable KHO support for memory preservation In-Reply-To: <20250402164453.2470750-1-changyuanl@google.com> References: <20250402164453.2470750-1-changyuanl@google.com> Date: Wed, 2 Apr 2025 16:47:38 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 87E6AC0008 X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: cf1epk9d4cmfn8sw7za6qt1ehetdjj9f X-HE-Tag: 1743612465-531429 X-HE-Meta: U2FsdGVkX18cp4TiyHisLx9oSM5RHk8xrIG4xI9D9/+dYOB0v6oNNjvTgFk9Md7Zu+6iTxoOvZ8HcFUEhP2B1OFRYDmz6lnxlpfeZj1cWty9FdsZZRX1NvLg5Q6yx8WJmwdSGCE5EGNpJxLFTc4XZTtshtykJW/tsb6FB81PNYrIUpBKn9K3+prXNENmlUzHvbo7EfjIoiZR5EA/nXVkqHh0wadeexQdDQ++/UwqL6zDkP+D5KcSnkFVuW1OxZc2IbDVoyA6nZiE/4k48YpvJqh8dJcMAsahMijcbRTU+rVOIxAbQQ4bieFpwW/CcAdUCCARIZrOjHOsWgpgkZbAXn8cXVNzsQIJpoWy6DuVdOxJJVSBMzhopB/XLr4GlimHwxtg0grR7JHUZCUQInTmT1J7Lgbdz+0lRuR8G7+JBH2ENnLJKW8EivUY6LNdELic7+ynQNSLFI7S6nVkEHAljUh5y+RnomF+PRn2oS//EuFJFWX6bxxenF3vXuMwsObX9Gwg0a0NCQh7aKGTeG5FaZ5IxYjMUWCafvK08W2dDAcBuLVn334Lscls4TUerTq+tQFPr+NhtnHX2l27+b+uVW7CfE6NVfA9O5p9NRbbXL2ra+freUcmtt2+U33n8PBWpbM7aXKmXcEXIKppiUsNRD1Y0cnXAl4ieh0HtA3qXsAZI1q55ueb1R38UOgGIqFqK6+tN1xIqVncJEfbR9LILDQBBxoCrz8Tpvx7DYMQcqgSACs/KXc1MkkJ29caZDMLIqekG/Nvw1PF62R3+2FHjSL6DckZSsk/3lLevN7JAPscwIybDV4Aw+YpZNVOGsVYWyNpD/5SBr0d8EsJnFasrYfRoJ4r17TlYku62vOrVzM9EoD3UWA+zQbRJdnSFCc3lGfGjYmACoCxgKv8KZiku8dEnl2VLU+MlwRJuUEFbwKVyRx3azFzvvKyMCqYY0OL0ehhLFV8J3NEqeQPX3V VzKi6kVs tjZAV8dy85XyZnzlkYtZ47Ea001lhkHjmOUSjcscWEbHffdxZ/tdU3h/df1JhRM9r9gt/LRxcQ6RyFa7UwoYuprcM0N47sBThmfkT2uUia9IOALwvLCd+H5XznpX4axpopaP5t6zYWswoTxpBFmu39KPcSjiGsBKop19m1PY6NFXOxBTD7blQRCJshQFV7WK9zzK63gF1OyKiYGFMwVhQDZhLuYzgoewU8aQRX0hVEuOr0sBJoBelaGX8CzF3Q3HKApHOlNHKU4PGTRdLilD3fa4nrAz1wN3iQ8EFhPnipKskyJHL4If0WL05E1MvhYOxcPiYyFNheKV8RhDwbAzRUWHxzWJBJs0K48eecFCSSvvqZ9d/wvENp+uoSYYHgABE6XLyd2YQGh2MtJ3cmi0BgcFoF4o2wpNk6CvaiogedZBAaHw= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000224, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Hi, On Wed, Apr 02 2025, Changyuan Lyu wrote: > Hi Pratyush, Thanks for suggestions! > > On Thu, Mar 27, 2025 at 17:28:40 +0000, Pratyush Yadav wrote: >> 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. > > I agree with Jason that "nothing is ABI at this > point" and it will take some time for KHO to stabilize. > > On the other hand if you have already came up with something working and > simple, we can include it in the next version. I already have something that works with zero-order pages. I am currently implementing support for other orders. It is almost done, but I need to test it and do a performance comparison with the current patch. Will post something soon! -- Regards, Pratyush Yadav