From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E48082C21CF for ; Fri, 14 Nov 2025 17:04:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763139877; cv=none; b=pu+Ok9uHY3pAu4py0IFeWVx2blDtvGRRF384Qf/1+5tcF7earpidYAjRJ3ze3ITCsFVsloJk9DD3fJuWCTigYymzNQFhW52rg7r0+LY8FsPrzyTgi9nJ/uWGibgDie2XGnfs34Gznm1FMTm2PUpV0x8Vf53E+GZF7elczwSYz5w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763139877; c=relaxed/simple; bh=wLxrgv3sUOLNiDmnHHWigIAhY0EhWAgzWSDG3kdvF1Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=QiUkfOc2oBI+wGCVBhXWMpSBE1yn/Lf7LqkU+il5Q9yS87adIffOyiDgOky72k1hgtRgVLIXwA84TD4+IU93jMyWNCaULISOAbHfqo7hGlDQ8FnjuOdC+EQFdH+4Hgvcu2JUJfPTrKvysmlCGvHc6SbQxtcmUEr35zvkSaIbWMk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=h4zz5ZeR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="h4zz5ZeR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 453CCC4CEF1; Fri, 14 Nov 2025 17:04:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763139876; bh=wLxrgv3sUOLNiDmnHHWigIAhY0EhWAgzWSDG3kdvF1Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=h4zz5ZeRaWdLKj5ZUywCVx20N6rT/1NPuF19hRA82nQZkaw/xIZpxHcPUImLnXdjb Az92XgTJNNKawV8Wqc1OzMEMlpRbYMg3tVVh1y/PLxq3PpDvGflLojKtICeL/6Yza+ UXiHi5bHKk+xvlZuQShfy2JdjDlYCfV+6ONP/iZ4rLxTSb49eTTtIPsZpYWEsghWYe KUXfoLkEr68Jh7+PBn8Dj1DFefacL43z5wNGb0LR6IbsUKhdw9XUN3b2QuhT23y/ly MpdT3sBGOlNXhlcSLOpvcTuRrjLiActa3LlVV+oGJdSV7B2nBP/FFkyqwQwlBBU8N/ iCyYosA4CzMcg== From: Pratyush Yadav To: Pasha Tatashin Cc: akpm@linux-foundation.org, bhe@redhat.com, rppt@kernel.org, jasonmiu@google.com, arnd@arndb.de, coxu@redhat.com, dave@vasilevsky.ca, ebiggers@google.com, graf@amazon.com, kees@kernel.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, linux-mm@kvack.org Subject: Re: [PATCH v1 06/13] kho: Simplify serialization and remove __kho_abort In-Reply-To: <20251114155358.2884014-7-pasha.tatashin@soleen.com> (Pasha Tatashin's message of "Fri, 14 Nov 2025 10:53:51 -0500") References: <20251114155358.2884014-1-pasha.tatashin@soleen.com> <20251114155358.2884014-7-pasha.tatashin@soleen.com> Date: Fri, 14 Nov 2025 18:04:33 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Fri, Nov 14 2025, Pasha Tatashin wrote: > Currently, __kho_finalize() performs memory serialization in the middle > of FDT construction. If FDT construction fails later, the function must > manually clean up the serialized memory via __kho_abort(). > > Refactor __kho_finalize() to perform kho_mem_serialize() only after the > FDT has been successfully constructed and finished. This reordering has > two benefits: > 1. It avoids expensive serialization work if FDT generation fails. > 2. It removes the need for cleanup in the FDT error path. > > As a result, the internal helper __kho_abort() is no longer needed for > internal error handling. Inline its remaining logic (cleanup of the > preserved memory map) directly into kho_abort() and remove the helper. > > Signed-off-by: Pasha Tatashin Reviewed-by: Pratyush Yadav [...] -- Regards, Pratyush Yadav