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 672543451DF for ; Fri, 14 Nov 2025 17:47:49 +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=1763142469; cv=none; b=LVysiaKudk5T9n8ORDioVg44cM/7AmJF+nyjvB7UrJ3EqpbP6pI2zjlUqh3XOwZTMeFrY1WVPYRbe29T215AJqXk3lXZkmIsECaacf9OeCmdVLd34YsO/6TeQvSxONh/M7IuYgOaq5gTlW4lB1cjOGII8VWNeLI5P2PU+BImqz4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763142469; c=relaxed/simple; bh=AgjgO/JE3OZ07MDSlomAz877pTgtrV+LOc7uLI5gBYs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=c0ZSi1ApuLyE4Brjn6jsHHnToGbCqL92Lu/s21VLIK+OiMA5aoxihBVw6F/mt6Zb2R0st6I0VLQ+d52pfdhQJ48LF4GKaXa9D71B2gUWAhUtxYZnl3wqPZNBexagry1Lu496B3EhrksQjNtaiq261QciIydq0p+lslfxXjAG9yk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=O1JN87/m; 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="O1JN87/m" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2F2EC19424; Fri, 14 Nov 2025 17:47:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763142469; bh=AgjgO/JE3OZ07MDSlomAz877pTgtrV+LOc7uLI5gBYs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=O1JN87/mEAZ2GV9XXdpj2U2zwA/hBk99V1wsYW4hRleUWzdwgTDhR6QC+ZZutfR2u LReqZKxbczhxFlzL5kJ2Ypk0uA7rnYlSc2heSnMezFYbeEfkI0frfTZw1M3sGRrLC+ eRZ1Rpd7o6M6PLw4WizL7smDg3pPuOCG1zhd+eUMEqRmFw7Xiw5QQ9VY/8G8pOf5h5 NzJCoCSTiNsvo09Pd8vJ+qWI3rhKbI45ucsKByNBIOAa6k6lltQEZlxxZ1ALE8KVWq 01THR5ZKvsKSycYUONgiUdsiJHT01W199neZwA5ESYZv4zHSaEff3PfAva5n14IwBv uLYHSUFJe7Rzw== From: Pratyush Yadav To: Pasha Tatashin Cc: Pratyush Yadav , 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 08/13] kho: Remove abort functionality and support state refresh In-Reply-To: (Pasha Tatashin's message of "Fri, 14 Nov 2025 12:23:54 -0500") References: <20251114155358.2884014-1-pasha.tatashin@soleen.com> <20251114155358.2884014-9-pasha.tatashin@soleen.com> Date: Fri, 14 Nov 2025 18:47:45 +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; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Fri, Nov 14 2025, Pasha Tatashin wrote: > On Fri, Nov 14, 2025 at 12:18=E2=80=AFPM Pratyush Yadav wrote: >> >> On Fri, Nov 14 2025, Pasha Tatashin wrote: >> >> > Previously, KHO required a dedicated kho_abort() function to clean up >> > state before kho_finalize() could be called again. This was necessary >> > to handle complex unwind paths when using notifiers. >> > >> > With the shift to direct memory preservation, the explicit abort step >> > is no longer strictly necessary. >> > >> > Remove kho_abort() and refactor kho_finalize() to handle re-entry. >> > If kho_finalize() is called while KHO is already finalized, it will >> > now automatically clean up the previous memory map and state before >> > generating a new one. This allows the KHO state to be updated/refreshed >> > simply by triggering finalize again. >> > >> > Update debugfs to return -EINVAL if userspace attempts to write 0 to >> > the finalize attribute, as explicit abort is no longer supported. >> >> Documentation/core-api/kho/concepts.rst touches on the concept of >> finalization. I suppose that should be updated as well. > > I looked at it, and it is vague, we are soon to remove finalize with > stateless kho from Jason Miu, so in that series that section can be > removed or replaced. Okay, fair enough. [...] --=20 Regards, Pratyush Yadav