[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: propagating vmgenid outward and upward
From: |
Jason A. Donenfeld |
Subject: |
Re: propagating vmgenid outward and upward |
Date: |
Wed, 2 Mar 2022 15:35:40 +0100 |
Hey again,
On Tue, Mar 01, 2022 at 04:42:47PM +0100, Jason A. Donenfeld wrote:
> For (B), it's a little bit trickier. But I think our options follow the
> same rubric. We can expose a generation counter in the vDSO, with
> semantics akin to the extern integer I described above. Or we could
> expose that counter in a file that userspace could poll() on and receive
> notifications that way. Or perhaps a third way. I'm all ears here.
> Alex's team from Amazon last year proposed something similar to the vDSO
> idea, except using mmap on a sysfs file, though from what I can tell,
> that wound up being kind of complicated. Due to the fact that we're
> _already_ racy, I think I'm most inclined at this point toward the
> poll() approach for the same reasons as I prefer a notifier_block. But
> on userspace I could be convinced otherwise, and I'd be interested in
> totally different ideas here too.
I implemented the poll() case here in 15 lines of code and found it
remarkably simple to do:
https://lore.kernel.org/lkml/20220302143331.654426-1-Jason@zx2c4.com/
This is just a PoC/RFC for the sake of having something tangible to look
at for this thread. It is notable to me, though, that implementing this
was so minimal.
Regards,
Jason
Re: propagating vmgenid outward and upward, Michael S. Tsirkin, 2022/03/01
Re: propagating vmgenid outward and upward, Greg KH, 2022/03/01
Re: propagating vmgenid outward and upward,
Jason A. Donenfeld <=
Re: propagating vmgenid outward and upward, Alexander Graf, 2022/03/09