From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF322606A327 for ; Wed, 2 Dec 2026 08:33:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=olOPZ1aY; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=YxXXK3b+ DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:Cc:To:From: Subject:Message-ID:References:Mime-Version:In-Reply-To:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=kpsSYU0K8zEDXvoeBsIeQZieWyIbBMD35jFmVCJ9P6w=; b=olOPZ1aYD0QAZ2Vyy2LRiHMMLU 3S7xHiPWND4vZT2iH03XrPlqtDDh55eAcANtCHnZJ6kzL9hyrNfqsb+8qw+o/Dt5tMPdNYhO0nCqT 1KK1bDU/nyoNJ0u1wrnrAKoPJyWrS3dI8w0i7LalUx4fv0iNhfPGVs243Ifn0dn80Xtd7T3GaHOCv IlX8eNxqFXr11/Mkn5xeWoqCiB0xPnelxu8HNQO6WCiso0WPYP/wqP+eVHVfdxcw4hPTBZ/bJWrqO YfSkL0EPdbNsSMGaIv0bDkbEt5CCYqPPUhmvIyMmR7S9HAplk7qE61ozE3EoQUc6kPb6w/f/N1avG xNqpdSGA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYflq-0000000AfSZ-18Mt; Wed, 02 Dec 2026 08:32:58 +0000 Received: from mail-ej1-x647.google.com ([2a00:1450:4864:20::647]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYflm-0000000AfQz-2ojB for linux-arm-kernel@lists.infradead.org; Wed, 02 Dec 2026 08:32:57 +0000 Received: by mail-ej1-x647.google.com with SMTP id a640c23a62f3a-c50547b4992so898112666b.3 for ; Wed, 02 Dec 2026 00:32:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796200371; x=1796805171; darn=lists.infradead.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=kpsSYU0K8zEDXvoeBsIeQZieWyIbBMD35jFmVCJ9P6w=; b=YxXXK3b+fPcAhQOoMQXcN+f+nISFsIk95yvTAR9+rLKptKxW5I8Cm6D07aa1jXpypL oD+hIQ7Zi2kJWd/wCJtoS4nU1xqYQLKqh0HpwstUdD3RT+rmzv/DvholPrvgl+Bik9Mz YJMGnSfYKHJK2aCh7NPWsYIPZDynVuDmK6nkIOpjIcuSCbeOJHvlfK3dPGt461XyI70E fYcSRB/bnXxo4DyktPVrQ1pbDQoKp+MM8YIFYX26OYNk+pq+S6ay3YIK9Er+mSdC6qKU s66VeGonR98o9tA1ikQWa84isZE8Gu7ax393Bv+EYKuQzM19Bf4EXayxv6jWBpW3IVv8 gO2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796200371; x=1796805171; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=kpsSYU0K8zEDXvoeBsIeQZieWyIbBMD35jFmVCJ9P6w=; b=l3YGOdLnNPK1McUAOn5tLAI5lFUHJDbMUQ7kCwItIYGYgjawRfnxu3LvTqVJ7SFJit L77kVf0IgGHWkT0TsgGcmupg98p4QVGbuXdk6z/oUjcqusUawlUnjcY85VtZ7pmwKb2D gG1+7VCY3A1nek8Ke/3eyYUSOtOOkFG0yqJgTL0itp0WS7WnUq0xhq01y/I111ljaweo mWW6KS59SOPqwCIE9lGY4CpG1JD9Wpn0xG8TTPXldd16Xegwd6gAYTV+VhWHuKrklrgf WJyGYncbWNFwzeomcXqNct3f6SC2JyZh6P/OMTqIHcxscb4rY8VvxxvnI4KGh3Q7sFJJ 4AWg== X-Forwarded-Encrypted: i=1; AL+hErEf3rce4TGQanqqCGun60iVfWulQ8cwfvRX4j3/2HbL102FjLLXN5RsHMf/I94PXGLLWAgcOARnbQTF2rJJSHVb@lists.infradead.org X-Gm-Message-State: APuU4Z+wsi26Ia9yanfXdPx9Of9dHphzZPM670nhEmOQ/iDECOpUqIUO itAalbP4wPe4CHH45LSQH8QYfEkAGmFW5jMCZLXF4pyVfSw9P4EELtH1suCgM3jNVPzSgQYimVg 2X8rP/snx/m4GQ3crhg== X-Received: from ejq13-n2.prod.google.com ([2002:a17:906:418d:20b0:c50:db6d:bc64]) (user=tarunsahu job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:6ea8:b0:c51:3bde:bfd0 with SMTP id a640c23a62f3a-c513bdec070mr3323425266b.47.1796200370925; Wed, 02 Dec 2026 00:32:50 -0800 (PST) Date: Wed, 02 Dec 2026 08:32:50 +0000 In-Reply-To: <2vxzcxrrwjsv.fsf@kernel.org> X-Archived-By: Mime-Version: 1.0 References: <20261110050202.529473-1-tarunsahu@google.com> <20261110050202.529473-9-tarunsahu@google.com> <9huzse13pxhq.fsf@tarunix.c.googlers.com> <2vxzcxrrwjsv.fsf@kernel.org> Message-ID: <9huzse0g3wwd.fsf@tarunix.c.googlers.com> Subject: Re: [PATCH v4 08/19] kho: block: Add the feature header to blocks From: tarunsahu@google.com To: Pratyush Yadav Cc: David Matlack , Pasha Tatashin , Mike Rapoport , robin.murphy@arm.com, maz@kernel.org, will@kernel.org, Alexander Graf , seanjc@google.com, jgg@nvidia.com, loganodell@google.com, arnd@arndb.de, dwmw2@infradead.org, baolu.lu@linux.intel.com, Bjorn Helgaas , oupton@kernel.org, alex@shazbot.org, gle.com@google.com, pbonzini@redhat.com, Andrew Morton , kevin.tian@intel.com, joro@8bytes.org, kvmarm@lists.linux.dev, linux-pci@vger.kernel.org, Pratyush Yadav , kexec@lists.infradead.org, kvm@vger.kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, skhawaja@google.com, sagis@google.com, linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_003254_733714_108100C0 X-CRM114-Status: GOOD ( 20.29 ) X-Spam-Score: -9.5 (---------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-13.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Pratyush Yadav writes: > On Sat, Nov 14 2026, tarunsahu@google.com wrote: > >> "David Matlack" writes: >> >>> On Tue Nov 10, 2026 at 5:01 AM UTC, Tarun Sahu wrote: >>>> Precede struct kho_block_header_ser with struct kho_ser_hdr using >>>> DECLARE_KHO_SER. Each block in a block set starts with struct >>>> kho_ser_hdr followed by struct kho_block_header_ser. Serialized entries >>>> start immediately after the header payload at offset fhdr->size. >>> >>> This adds a feature header to every block in the set, but the layout it >>> describes is a property of the whole set: all blocks are written by the >>> same kernel with the same header. >>> >>> Blocks are only ever added and removed at the tail, so the head block >>> is stable for the lifetime of the set. I'd put a single set-wide >>> header in the first block only, e.g. a struct kho_block_set_ser with >>> its own feature header, and keep the per-block header to next and >>> count. >>> >>> entry_size (added in patch 2) is another set-wide property that belongs >>> there. All blocks in a set have the same entry size, so recording it in >>> every block is redundant, and restore has to check that the copies >>> agree. >>> >> >> Yes, adding a ser_hdr to each block_header is unnecessary and also cause >> 8 bytes to get added to every block. This can be solved like you said by >> adding it only to the first block. But this will make number of entries >> in block[0] to be less than blocks 1..N. I am not sure if that is >> acceptable but if it can be then we can avoid adding ser_hdr to each >> block. Same for entry_size which can be moved to the first block only >> like you suggested part of struct kho_block_set_ser. > > I think it is simpler to do as kho_vmalloc does and just have a separate > out-of-band structure to hold all the metadata. Right, I will implement this in v5. Thanks > > [...] > > -- > Regards, > Pratyush Yadav