Linux Documentation
 help / color / mirror / Atom feed
From: Pasha Tatashin <pasha.tatashin@soleen.com>
To: Mike Rapoport <rppt@kernel.org>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>,
	 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
Subject: Re: [PATCH v6 07/13] kho: add support for linked-block serialization
Date: Wed, 3 Jun 2026 15:03:36 +0000	[thread overview]
Message-ID: <aiA_j7udFaO9TRBP@plex> (raw)
In-Reply-To: <178049725439.475072.11560134126837430744.b4-reply@b4>

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 <pasha.tatashin@soleen.com> 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 <asm/page.h>
> > > > > > +#include <linux/types.h>
> > > > > > +
> > > > > > +#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.

> 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.

> * 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.
> > 
> 
> 

  reply	other threads:[~2026-06-03 15:03 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-03  3:28 [PATCH v6 00/13] liveupdate: Remove limits on sessions and files Pasha Tatashin
2026-06-03  3:28 ` [PATCH v6 01/13] liveupdate: change file_set->count type to u64 for type safety Pasha Tatashin
2026-06-03  3:28 ` [PATCH v6 02/13] liveupdate: avoid mixing cleanup guards with goto in luo_session_retrieve_fd Pasha Tatashin
2026-06-03  6:52   ` Mike Rapoport
2026-06-03  3:28 ` [PATCH v6 03/13] liveupdate: centralize state management into struct luo_ser Pasha Tatashin
2026-06-03  6:52   ` Mike Rapoport
2026-06-03  3:28 ` [PATCH v6 04/13] liveupdate: register luo_ser as KHO subtree Pasha Tatashin
2026-06-03  6:50   ` Mike Rapoport
2026-06-03  9:32     ` Mike Rapoport
2026-06-03 13:31   ` Mike Rapoport
2026-06-03  3:28 ` [PATCH v6 05/13] liveupdate: Extract luo_file_deserialize_one helper Pasha Tatashin
2026-06-03  3:28 ` [PATCH v6 06/13] liveupdate: Extract luo_session_deserialize_one helper Pasha Tatashin
2026-06-03  3:28 ` [PATCH v6 07/13] kho: add support for linked-block serialization Pasha Tatashin
2026-06-03  6:49   ` Mike Rapoport
2026-06-03 12:05     ` Pasha Tatashin
2026-06-03 13:21       ` Pasha Tatashin
2026-06-03 13:59       ` Mike Rapoport
2026-06-03 14:11         ` Pasha Tatashin
2026-06-03 14:34           ` Mike Rapoport
2026-06-03 15:03             ` Pasha Tatashin [this message]
2026-06-03 15:18               ` Mike Rapoport
2026-06-03  3:28 ` [PATCH v6 08/13] liveupdate: defer session block allocation and physical address setting Pasha Tatashin
2026-06-03  3:29 ` [PATCH v6 09/13] liveupdate: Remove limit on the number of sessions Pasha Tatashin
2026-06-03  3:29 ` [PATCH v6 10/13] liveupdate: Remove limit on the number of files per session Pasha Tatashin
2026-06-03  3:29 ` [PATCH v6 11/13] selftests/liveupdate: Test session and file limit removal Pasha Tatashin
2026-06-03  3:29 ` [PATCH v6 12/13] selftests/liveupdate: Add stress-sessions kexec test Pasha Tatashin
2026-06-03  3:29 ` [PATCH v6 13/13] selftests/liveupdate: Add stress-files " Pasha Tatashin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aiA_j7udFaO9TRBP@plex \
    --to=pasha.tatashin@soleen.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=dmatlack@google.com \
    --cc=graf@amazon.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pratyush@kernel.org \
    --cc=rppt@kernel.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=skhawaja@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox