From: Pratyush Yadav <pratyush@kernel.org>
To: Chenghao Duan <duanchenghao@kylinos.cn>
Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz,
linux-fsdevel@vger.kernel.org, pasha.tatashin@soleen.com,
linux-kernel@vger.kernel.org, rppt@kernel.org,
pratyush@kernel.org, kexec@lists.infradead.org,
linux-mm@kvack.org, jianghaoran@kylinos.cn
Subject: Re: [PATCH v1 1/2] eventfd: luo: luo support for preserving eventfd
Date: Thu, 25 Jun 2026 11:06:04 +0200 [thread overview]
Message-ID: <2vxzfr2bkn0j.fsf@kernel.org> (raw)
In-Reply-To: <20260625054946.73445-2-duanchenghao@kylinos.cn> (Chenghao Duan's message of "Thu, 25 Jun 2026 13:49:45 +0800")
On Thu, Jun 25 2026, Chenghao Duan wrote:
> This patch adds support for preserving eventfd file descriptors across
> kexec live updates using the Live Update Orchestrator (LUO) framework.
> Userspace applications using eventfd for event notification can now
> maintain their state across kernel updates.
>
> Preserved State:
> The following properties of the eventfd are preserved across kexec:
> - Counter Value: The current 64-bit counter value, including any pending
> events that have been signaled but not yet consumed by readers.
> - File Flags: The creation flags (EFD_SEMAPHORE, EFD_CLOEXEC, EFD_NONBLOCK)
> are preserved.
>
> Non-Preserved State:
> - File Descriptor Number: The eventfd will be assigned a new fd number
> in the target process after restore.
> - Wait Queue State: Any processes blocked on read() operations will be
> woken up and need to re-establish their blocking state.
> - All other internal state is reset to default.
>
> Changes:
> - fs/eventfd.c: Add eventfd_luo_get_state() to safely read eventfd state
> (count and flags), and eventfd_create() helper function.
> - fs/eventfd_luo.c: New file implementing LUO file operations:
> preserve, freeze, unpreserve, retrieve, and finish callbacks.
> - include/linux/eventfd.h: Export new functions.
> - include/linux/kho/abi/eventfd.h: Define the ABI contract with
> eventfd_luo_ser structure for serialization.
Why do you need to preserve this? Why don't you create a fresh one after
kexec? You just preserve the counter, which looks pretty much useless.
You can just as well open a new eventfd after kexec and set the counter
value if you care about it.
[...]
--
Regards,
Pratyush Yadav
next prev parent reply other threads:[~2026-06-25 9:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 5:49 [PATCH v1 0/2] luo support for preserving eventfd Chenghao Duan
2026-06-25 5:49 ` [PATCH v1 1/2] eventfd: luo: " Chenghao Duan
2026-06-25 9:06 ` Pratyush Yadav [this message]
2026-06-25 5:49 ` [PATCH v1 2/2] selftests: liveupdate: Add selftest for eventfd LUO Chenghao Duan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2vxzfr2bkn0j.fsf@kernel.org \
--to=pratyush@kernel.org \
--cc=brauner@kernel.org \
--cc=duanchenghao@kylinos.cn \
--cc=jack@suse.cz \
--cc=jianghaoran@kylinos.cn \
--cc=kexec@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pasha.tatashin@soleen.com \
--cc=rppt@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox