From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72A073D1CC1; Wed, 3 Jun 2026 15:18:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780499927; cv=none; b=ATm/tIbHXrbZNgeJXPluqRO2U2rYHcBhIjyrh1Wpn8e0S0RgQH67L+djvWQ86yq7XRHERKp2dxtzfZQzJeG3VfNIrt6mYPay/ehwaqB2sN7n3KebrVobt1ocXq+9g3ll0F9cCUBAE0AcsB+NTrcXMXSxkg5XopkY0YKu1e9MIHU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780499927; c=relaxed/simple; bh=YF7xn7hgjPsOhYw+YjiF/ybr1IQd0XiGCqBnPwAR5+c=; h=MIME-Version:Content-Type:Subject:From:To:Cc:In-Reply-To: References:Date:Message-Id; b=XlcydNHjLoEEoiJ5q/6MzmBQZA/zIjUkGaDj1fKV2YDkUNaGikfpAJZtwOPcv2d+krYs1qjRY0RYQft8UU5/CmMgN0w8/dsup23lOo6eJJGu3gmd1wuifwJambMEmRlvAP3LJ3B8MwHl2gFzUulTXP5rOTTOIlBiVFqO97gGFZQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gqiDx2XI; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gqiDx2XI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D17521F00898; Wed, 3 Jun 2026 15:18:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1780499926; bh=Row1/ZMLh6mM+sigh4dqTjgwYgOfCp9sUzuCj7aY0Fw=; h=Subject:From:To:Cc:In-Reply-To:References:Date; b=gqiDx2XIJ6TAOhH6COyc85O7nZTepQiHDoIwbNNC292yB9TuNTxpGhJ/VrhM5MgSG hCV+5zMk9sWy8BJLb6mJEiXT/PFhFr/ysO1atbo7egQSNjeeYYqVvW3/maP6WuQDLl 4ksBKHdCFbbC0xk3Wc6+1V91XA5ji5JyMED+9Rqs+mbNNtuzP4kry6+rq0iFxpuMv9 QzEbzzSDWUgCIhTx4qU+EXMSm3EoPiuHSgHqN00eIC2jOYah12EaiVGODawZwWRz12 01NbzKgqcrqvjs5B7e9buR3+Wf9D07ezTSb5wyK22sUjVLWU7hMtWJvkm2AbPEunzS 0JKuLIzwWry2w== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: Re: [PATCH v6 07/13] kho: add support for linked-block serialization From: Mike Rapoport To: Pasha Tatashin Cc: Mike Rapoport , linux-kselftest@vger.kernel.org, shuah@kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, skhan@linuxfoundation.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, corbet@lwn.net, dmatlack@google.com, kexec@lists.infradead.org, pratyush@kernel.org, skhawaja@google.com, graf@amazon.com In-Reply-To: References: <20260603032905.344462-1-pasha.tatashin@soleen.com> <20260603032905.344462-8-pasha.tatashin@soleen.com> <178046937151.468621.13398573538792303093.b4-review@b4> <178049725439.475072.11560134126837430744.b4-reply@b4> Date: Wed, 03 Jun 2026 18:18:38 +0300 Message-Id: <178049991886.481270.8804649242857550471.b4-reply@b4> X-Mailer: b4 0.15.2 On 2026-06-03 15:03 +0000, Pasha Tatashin wrote: > On 06-03 17:34, Mike Rapoport wrote: > > On 2026-06-03 14:11 +0000, Pasha Tatashin wrote: > > > On 06-03 16:59, Mike Rapoport wrote: > > > > On Wed, Jun 03, 2026 at 12:05:04PM +0000, Pasha Tatashin wrote: > > > > > On 06-03 09:49, Mike Rapoport wrote: > > > > > > On Wed, 03 Jun 2026 03:28:58 +0000, Pasha Tatashin wrote: > > > > > > > diff --git a/include/linux/kho/abi/block.h b/include/linux/kho/abi/block.h > > > > > > > new file mode 100644 > > > > > > > index 000000000000..8641c20b379b > > > > > > > --- /dev/null > > > > > > > +++ b/include/linux/kho/abi/block.h > > > > > > > @@ -0,0 +1,56 @@ > > > > > > > [ ... skip 25 lines ... ] > > > > > > > +#define _LINUX_KHO_ABI_BLOCK_H > > > > > > > + > > > > > > > +#include > > > > > > > +#include > > > > > > > + > > > > > > > +#define KHO_BLOCK_ABI_COMPATIBLE "kho-block-v1" > > > > > > > > > > > > It's never used by block set and after looking at the following patches I > > > > > > found that it's appended to LUO compatible string. > > > > > > > > > > > > While this works for LUO, I think it should be kho_block_set_restore() > > > > > > responsibility to verify the compatibility. > > > > > > > > > > It should work for any component that relies on kho_block. My proposal > > > > > is to use this method for other common KHO data structures (e.g., kho > > > > > vmalloc, kho radix, future kho xarray). There is no need for them to > > > > > carry the compatibility string in their metadata, as whoever uses them > > > > > will include their compatibility string. > > > > > > > > So if, say, memfd_luo uses kho vmalloc, xarray and blocks it'll have five > > > > compatibility strings glued together? > > > > > > That is correct, but it will be in only one place: the header of the > > > client's KHO subtree. Since it is dynamically sized and 8-byte aligned, > > > it should be safe to include in any struct. > > > > This is safe, you are right. > > But I have more usability concerns from one side and the duplication it > > causes from the other. > > > > I can see the downside of putting the version information in the data > > structure itself as it either requires a different header for the first > > element or needlessly increases all the headers. > > > > But > > > > #define LUO_ABI_COMPATIBLE LUO_COMPAT_BASE "-" KHO_BLOCK_ABI_COMPATIBLE "-" KHO_VMALLOC_ABI_COMPATIBLE "-" KHO_RADIX_COMPATIBLE > > > > is not really digestible too. And it forces KHO users to potentially > > track KHO internal changes. > > These are compatibilities; I think they are quite digestible, both to > write and also when the LUO_ABI_COMPATIBLE string is printed out for > debugging/info purposes. I agree to disagree :) It's KHO property, not it's users. > > We still don't promise any compatibility between different kernel > > versions so to avoid blocking this series on the decision what is the > > best way to convey KHO data structures compatibility I suggest to bump > > kho ABI version in v6.2* of the patch that adds KHO blocks and postpone > > this discussion to after rc1 when we'll have plenty of time. > > Let's keep this patch as is for now. We will have a broader discussion > when we convert other participants to this new scheme. If we decide not > to pursue this approach, we will change this code to use an independent > compatibility string. However, having this in place as a template will > help us convert other components correctly, ensuring proper alignment > and that correct string helpers like strncmp / strscpy are used—which I > have already ensured is the case in LUO. Pasha, this sounds like salami approach :) We didn't agree yet to convert other components and even to use this scheme globally. Changing this during -rc does not seem a good practice. So whatever new versioning scheme we'll come up with, it'll have to wait until v7.3. Let's bump kho and LUO ABI versions and drop the concatenation for now. It's a small change to the patches, so I don't see it as a blocker for merging them in v7.2. > > * sending a new version of a single file does same email traffic, but it > > confuses b4 and quite possibly other tools, so I think v7 is better. > > Agreed, I also prefer re-sending the whole series... > > Pasha > > > > Pasha > > > > > > > > > > > > For now, reviewers will have to make sure that if the ABI header content > > > > > is changed, the compatibility string is updated. > > > > > > > -- > > > > Sincerely yours, > > > > Mike. > > > > > > > >