From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.69 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796200373; b=g4nv0wMAF70f3v8QIQXEdtQe/sBH9AaX9diiYotVYhdjCALoIg1JMpy6v7FumSovSsNY GH88vXfJhklVq03gie5njFUfMiLhe8pbIjNDycky9wt4D6Y241sNni2UsTcywNa5ljH5Z amb8L9+6xZJQ1emjJhySeXPMSIvMQrVvd68SYIjPqnnXwE8b1d5jqlh27xAGVodcg79+M f+0+GG9k4Mf1dHOWz/tbcJK/7VVI50dbeR76h5dcExo+thXSp/Pg4vCzwkeAwqmS7RYHa U3Ti7JzLS7rVFowgAGQu9yb1MBHrEXf8XpuPHvVBplHMNXhGbDgmfavDn/rBfhosvHA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796200373; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:Message-ID:Subject:From:To:Cc:Content-Type; bh=kpsSYU0K8zEDXvoeBsIeQZieWyIbBMD35jFmVCJ9P6w=; b=zobsA21jcgKPAVRuBYSc2ynKhMONcRdBs6qW4Rzm8ZwvMX2Qu+KOUbrHFIqyX1MUK6Go 3zeR0xEK7fl4rjirrP4sxKcBxStaQi1JI9CIloOa47LyJSv7j6IS2RuU8SkdVe9nKhcCA TN5v7EMAOmuKn+tPe/d6KGbcgP8OxiKnMWRS4ofXaF8ShIMQ2n/hdzX52driIwtlh0AvP elqjV8CPy7YyITjFJNWpqCzSpyg82elivEIhTuyLwaam7NjhxOzrmIdGCsdhiaqlfUSL/ t64tB609L51UUsA8ompTzHdyxIE1LHhDKe4x0+BMlr2MthREiSrWlkPNLe+rorMChrg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--tarunsahu.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b="fmqfBAq/"; arc=none smtp.remote-ip=209.85.218.69 Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C90A606A331 for ; Wed, 2 Dec 2026 08:32:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2C90A606A331 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--tarunsahu.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=fmqfBAq/ Received: by mail-ej1-f69.google.com with SMTP id a640c23a62f3a-c508f61e492so933933666b.2 for ; Wed, 02 Dec 2026 00:32:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796200371; x=1796805171; darn=vger.kernel.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=fmqfBAq/lFlkNqZZREW87ZRwGNdJ/3opgoQWc0i/4EIs4StZRAidXe+7oEodeeVvOs JDnAfOL9TTsm1CaBNLnWCCOteQiG6CF1ZnjEfLhXzDGLQ//G57qN/g9974LZ+7dQgBBn wE9yt8DOyKpYKxp76jxgZtftEs1pE1tm/ZdhX2DS9yifDTl5ZGKG/IQCaI5pf5wbnmrZ UlE7O6RDfrEYL3U1DuIz0zqvHJC7O2hJZha6uY+HYXSCX7k3Vnkg/3g3a0Z2BeatJS8y 6NQdStRWxTMPRU6mksdcdU0NiOavDIPgwWG/XaqYi2EPe0mMQPnoLFZrRP6KPZPGw6uL ikTQ== 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=Plqsu5vr69HjtH37v+Uim4VwVSW21wqYnkXjoR+WrmxcxBotunZ3CrMKbUxu6ECyNp 2eocC9pkYpz6Ojv6peq1E2egBFtnd5rUcLpqBCmjh7HCNVc+7HiBEc3ePE39DrzNWOjB iHX7PUA9lfoSEYABeUGoZl+zZBTwMZ4tB8NqBafTwoub5ERqMUN5fWGqLU6Rx55oIjRQ pqE49DsgAKodfMuRDjU/UfQ5u7loh+YOLW1DjmK9S4wfh8y3PImJ4RMAgLnWwdvuO3Zj BGtLsiRg1SQMz0b86mbxbf0KX8Cc7xbgJXgV1ZRlxDsAI639wuG2xpqXUowOYJhN/V4a 44Ww== X-Forwarded-Encrypted: i=1; AL+hErFy14f9OeaHAhKWVfps4mfn/sfk/NPOmkvhIHTJQsbIlwXNWNmab68J2EXj60l0CpKOiBk7NhJMVwjBMdc=@vger.kernel.org X-Gm-Message-State: APuU4Z92TpueBj7UdG3V1wXITD8RAYl2UO0pnHRDoRKViPihtdIb9E5r /1q3wycs6TyeLUl8sCBXgFtSrDmA2Y27vM/vmaKeLPo+cpZWIfi4fdMAE69NbpH//ndEa8M/Snm Z+mEZ+3fnPyeVpvdONw== 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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" 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