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 F3F3CC28B20 for ; Wed, 2 Apr 2025 18:37:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C4EEF280003; Wed, 2 Apr 2025 14:37:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BFC8F280001; Wed, 2 Apr 2025 14:37:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEBAD280003; Wed, 2 Apr 2025 14:37:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 9140F280001 for ; Wed, 2 Apr 2025 14:37:53 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id A86161405CC for ; Wed, 2 Apr 2025 18:37:53 +0000 (UTC) X-FDA: 83289962826.07.FD3C46F Received: from mail-qt1-f177.google.com (mail-qt1-f177.google.com [209.85.160.177]) by imf09.hostedemail.com (Postfix) with ESMTP id CC698140006 for ; Wed, 2 Apr 2025 18:37:51 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=soleen-com.20230601.gappssmtp.com header.s=20230601 header.b=jDzFaEeC; spf=pass (imf09.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.160.177 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com; dmarc=pass (policy=none) header.from=soleen.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743619071; 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=8sGZeCa0sKqwzNT7+OssvY0XCe1f29aCSfnouhi7cVM=; b=uSVoKbehLSyzib4Qe2ZTDEs6E/abF5uXYBID0Ss/KM7W7koehVckf4xbtXJaXCkVtmm1iC VKa3Dn1B1ctdSyudGLsPN/no8CsfscFmm6tu7BshzjZJNaDmgWjiblK71LiZtScbS469LF Wc/uKo8AK+xWKcZJJJROrhggYAnfcOk= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=soleen-com.20230601.gappssmtp.com header.s=20230601 header.b=jDzFaEeC; spf=pass (imf09.hostedemail.com: domain of pasha.tatashin@soleen.com designates 209.85.160.177 as permitted sender) smtp.mailfrom=pasha.tatashin@soleen.com; dmarc=pass (policy=none) header.from=soleen.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743619071; a=rsa-sha256; cv=none; b=rq3jMP7941IVC3Fn18Z+ttPWVpS5Bg2I3lDLqhvW5vi5XZVX596I8VVeVNfMNcp29iCaoa fQD0MtXcrO/71eFmYskZ3b8ydkM/o8JnnKLDGNLZma+tbm55u8v3lhiaKZ0r6kMuvYGpo4 r7b38dIjPpUj+wQaS2BEY24OqcVjjfY= Received: by mail-qt1-f177.google.com with SMTP id d75a77b69052e-4766cb762b6so1536991cf.0 for ; Wed, 02 Apr 2025 11:37:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen-com.20230601.gappssmtp.com; s=20230601; t=1743619071; x=1744223871; darn=kvack.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=8sGZeCa0sKqwzNT7+OssvY0XCe1f29aCSfnouhi7cVM=; b=jDzFaEeCgIZcKxT/r0f/Xv7IQ3rK0SH6DI9F9hA7BVHiVPIsLShEquZR4ON0HTmSIV RbfknWvsoatTVcCbKP0wHq5QlQ9oCRwenVx6vtA+Kw7WN2RKhUBl8tp9mnNuHYCQCCp3 8lc1Sm8tbZ1cxMULo0AounMftMWy6mbbx/X20r+ANyHH99pDy3rLb2nBXyzb1Ab2NvbO 4vx3M0H4MdCTDFym3bmw0Wfyxc93XvKs+xWu2Vta9Fk+AOCCe/wLYqeEy4FJcXlfgp6b ga9CAkLkt1/oq/nP0wmObl9NYHIWoQREUGF7phlies1ef/+rSCBfJtRly01LNYdDbrOT zdhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743619071; x=1744223871; h=content-transfer-encoding:cc: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=8sGZeCa0sKqwzNT7+OssvY0XCe1f29aCSfnouhi7cVM=; b=kYXxHVZxdP3POQNJIoqwEDVij4Z22Nevt2viDV3yoqCbfy2zZBTqxqIwiCC68mZMvz h1HqJWXL+90hR0LtXPY7+8sh4u1arOeNALRQjbnPB1ndQxpSJ+YNgLIK7n/MaXFi4Ep4 NXndD7yjqQIuo2QChrGDUEV4KsWnXbB5CYh0SKS/Ll8PI37P1fiV8/hoQ3CNfX/Xdh3l uJ0MPt9tFm78lFXVgX5QlOpxyQKzkKkm+alq8jrVCYYB+eBhj+v39gyTtFwbn6JH+Oaa qkiPJTO5coeFPCrMh72SS9upOM8awEljyswDjh4zDrr4SyedfqBp2edBKQxIJsFSgyCa wHtg== X-Forwarded-Encrypted: i=1; AJvYcCUB8bC+yeausESYxl9/SCpgFjef6s3zYWAXJNVXWQDVPcqwikGMoBTJ6HBOZPTGpIXTLzXPGVOGSg==@kvack.org X-Gm-Message-State: AOJu0YyXge9V9fIteQdiGipFQXs8LJd0XpYHr88vQVfDj6+X6K2UAFg2 Qsd3o2l2aE+pqrdMI/hbPXrqS+dKWYtKsvcZByf3+DhJqZ0s8jkde7z2+1CRDQW1cnUpkXuHYal 1yy7AAEW5jq4FAfc1kt1Kl7qBlRt+5iqr0XOxfA== X-Gm-Gg: ASbGncsnVx23vH9CdUUODWKoDjI8h3GAPnCBy5Xi1X5LGPH7NoqbgL0CRAz8juyYMjs cF/Ywr6pOiRlRaiSrOJvtPBKhUnG6R6paPiWBvKvtm6rzGI+B/js10n5RIMNTd+660AXjozmfTj Ra3E2ffBgf8lXgQoQnLZEcX0Q= X-Google-Smtp-Source: AGHT+IGBm8eRAZTRRIQNHm7hrKsMWsRZO7yaRU5V8qu8Hz4XTnZI9DQTzhglhyasNi+RSLHZS4pwai1XiiNO0rfUKEY= X-Received: by 2002:a05:622a:255:b0:472:145:3e02 with SMTP id d75a77b69052e-4791615e607mr11970971cf.8.1743619070935; Wed, 02 Apr 2025 11:37:50 -0700 (PDT) MIME-Version: 1.0 References: <20250402164453.2470750-1-changyuanl@google.com> In-Reply-To: From: Pasha Tatashin Date: Wed, 2 Apr 2025 14:37:12 -0400 X-Gm-Features: AQ5f1Jr9Neh0jFNvgUt9co1Ay0Junb4b6fkF7RtFZQf-u5XIPaKITjI68-n5adU Message-ID: Subject: Re: [PATCH v5 09/16] kexec: enable KHO support for memory preservation To: Pratyush Yadav Cc: Changyuan Lyu , akpm@linux-foundation.org, anthony.yznaga@oracle.com, arnd@arndb.de, ashish.kalra@amd.com, benh@kernel.crashing.org, bp@alien8.de, catalin.marinas@arm.com, corbet@lwn.net, dave.hansen@linux.intel.com, devicetree@vger.kernel.org, dwmw2@infradead.org, ebiederm@xmission.com, graf@amazon.com, hpa@zytor.com, jgg@nvidia.com, jgowans@amazon.com, kexec@lists.infradead.org, krzk@kernel.org, linux-arm-kernel@lists.infradead.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, luto@kernel.org, mark.rutland@arm.com, mingo@redhat.com, pbonzini@redhat.com, peterz@infradead.org, robh+dt@kernel.org, robh@kernel.org, rostedt@goodmis.org, rppt@kernel.org, saravanak@google.com, skinsburskii@linux.microsoft.com, tglx@linutronix.de, thomas.lendacky@amd.com, will@kernel.org, x86@kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: CC698140006 X-Stat-Signature: 87adukk6kftz495ugybgeo3ncsqzbmr5 X-HE-Tag: 1743619071-56811 X-HE-Meta: U2FsdGVkX1+wVigdv3VstnfzYVbIkK5W9/20LtGgj+FZhIxvyulsVzH6P4uhX0R/cChIHl2qmnpUBWBegEDhs5Mzza49oR/7+2i28tX2xlkaRTCrN20JiZLAbkiVGzfEPHdJ+laCu+yE1qwfBAj6hmbbRmHj9CZCzW1A1b9g7XXa9F/dtJHZKSUTPehTvuo/gLgc2r4F+t73tH24WW9kICT8mlpqVoBICvlXjWoQx2qu3Vc+vmXdqNbhi5mk8x2J6BVHCdawz3nel9Aa7uIeKe5nNYCg96KHk7bjlFxAniyrUW2hwPNcK6wJ3lP+TvuV9SrleYQ7KVi5WDnjf/j9JiDwEzS2wxglpzKSJupFW35Ahpu0O6lHlaUOQHIspEzyoMvRMD92tOFZ4CJ8kWHCd0rI3n02dTecem3Lr4qCmLP8R/ZBqoy/t8OZMxd1oTup5ulQs6EXoGrMS+15Ut6MXi1p93tgzi6qtvY+WyIocT8FioAp2l17WVfY6fcyz1iaflzLnHMg3wQYBVskNUcpaUj7NZ1PR21L+zphOTWwJSfJhpntuWIZyoviEDE0N203cql2L2Wc8pJz0aVTEMFlp/LWnfqFPvmlvY5x3+DlAzo3WfYx7GT+Hc3QhXAb6FfNR5hK5dHgZBsPIgfoha9BzAMc1ufyFXcdSK+mHGhIBX5Q4qq+tfx1JfGs0NZ4S1HvV493dGcwHoIQIRdlgFrnMj6JiElQbPq76l64dmC3XXOwEYeZDgfXND/jZJjmvUVRvTSsVHKHHWMEpkmg+Eqx/1Ie/3X+n5K9tdq0BiKLi5qGcXwSgZ3PyEivWa8TQXxNWjB6cxb/64H3lGjdTNOzqQj0siRpOKBKvEn9jOU+gGvrds+f+wsW3450qypfhYgDOH7E6nM9cB9y+usfYFxJOnRnfwBuawO+xXuDvSSvfdsd9RmzokWQeCkLVUghvqvH3AbUiB2r8UIuP+r0qUC XTMxDdpy aeCwXbzdeVv3F/kKpryXsDvnZ+jhHnWzdqiNCUDb7aAqusGpqeTbf0Gh8l/EW6jnr/T1jsrnAvAgLMDVi8njfItW+uJSPe5HIoM3rrHFtEcV7MRMC5D5RB8498uKEJP1MbySO1TJZZiz4XhM9TcI7dapnhLqbtardKFNFZSbxPSFVVnbyISgHiruIZ94dTXa5OpvjosPAJt5ci4SL/FKxQo91ktW+7kMyFQ6vXA1Y4D510aTakmy0ZMOIToAWIdytdcfu1VbL/DdqjrgNF6UXV9baFOp2kCHHfww0iC2yiTipRxJ0PTHE8Uwcb7zNrE8Xd8Ug X-Bogosity: Ham, tests=bogofilter, spamicity=0.001220, 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, Apr 2, 2025 at 12:47=E2=80=AFPM Pratyush Yadav = wrote: > > 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 lik= e > >> >> structure would be better -- only instead of having PTEs at the low= est > >> >> 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 tab= le > >> > 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 ho= t > >> > spots actually are. > >> > >> The memblock_reserve side we can optimize later, I agree. But the memo= ry > >> 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 th= an > >> 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 an= d > > 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! Hi Pratyush, Just to clarify, how soon? We are about to post v6 for KHO, with all other comments in this thread addressed. Thanks, Pasha > > -- > Regards, > Pratyush Yadav