lkml.org 
[lkml]   [2026]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v1 1/3] liveupdate: skip serialization for context-preserving kexec
Date
On Wed, May 06 2026, Pasha Tatashin wrote:

> On 05-06 10:31, Pratyush Yadav wrote:
>> Hi Pasha,
>>
>> On Wed, May 06 2026, Pasha Tatashin wrote:
>>
>> > A preserve_context kexec returns to the current kernel, which
>> > is unrelated to live update where the state is passed to the next
>> > kernel. Skip liveupdate_reboot() in this case to avoid serialization
>> > and prevent sessions from being left in a frozen state upon return.
>>
>> Should we also stop KHO? Now it is stateless and always finalized. I am
>
> No. KHO preserves kernel internal memory; for context-preserved
> kexec, the 2nd kernel and the 1st kernel do not have overlapping
> memory. So, whatever the 1st kernel maintains in KHO is an internal
> detail of the 1st kernel. Once we return from the 2nd kernel to the 1st
> kernel, all KHO memory is going to stay as-is, and the 1st kernel can
> even perform a regular kexec or live update later.

My point is that we keep KHO data in the 1st kernel but do not pass it
to the 2nd kernel via setup_data or the devicetree because it should not
use that memory anyway. So essentially we add a check in
kho_fill_kimage() and return early if preserve_context is set.

I don't think it makes much difference in practice so no strong
opinions. Fine either way.

[...]

--
Regards,
Pratyush Yadav

\
 
 \ /
  Last update: 2026-05-06 17:39    [W:0.048 / U:21.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog