On Fri, Aug 29, 2025 at 12:18:43PM -0700, Chris Li wrote: > Another idea is that having a middle layer manages the life cycle of > the reserved memory for you. Kind of like a slab allocator for the > preserved memory. If you want a slab allocator then I think you should make slab preservable.. Don't need more allocators :\ > Question: Do we have a matching FDT node to match the memfd C > structure hierarchy? Otherwise all the C struct will lump into one FDT > node. Maybe one FDT node for all C struct is fine. Then there is a > risk of overflowing the 4K buffer limit on the FDT node. I thought you were getting rid of FDT? My suggestion was to be taken as a FDT replacement.. You need some kind of hierarchy of identifiers, things like memfd should chain off some higher level luo object for a file descriptor. PCI should be the same, but not fd based. It may be that luo maintains some flat dictionary of string -> [object type, version, u64 ptr]* And if you want to serialize that the optimal path would be to have a vmalloc of all the strings and a vmalloc of the [] data, sort of like the kho array idea. > At this stage, do you see that exploring such a machine idea can be > beneficial or harmful to the project? If such an idea is considered > harmful, we should stop discussing such an idea at all. Go back to > building more batches of hand crafted screws, which are waiting by the > next critical component. I haven't heard a compelling idea that will obviously make things better.. Adding more layers and complexity is not better. Your BTF proposal doesn't seem to benifit memfd at all, it was focused on extracting data directly from an existing struct which I feel very strongly we should never do. The above dictionary, I also don't see how BTF helps. It is such a special encoding. Yes you could make some elaborate serialization infrastructure, like FDT, but we have all been saying FDT is too hard to use and too much code. I'm not sure I'm convinced there is really a better middle ground :\ IMHO if there is some way to improve this it still yet to be found, and I think we don't well understand what we need to serialize just yet. Smaller ideas like preserve the vmalloc will make big improvement already. Lets not race ahead until we understand the actual problem properly. Jason