Thread (22 messages) flat view 22 messages, 6 authors, 2014-09-20

Re: [PATCH] x86/vdso: Add prctl to set per-process VDSO load

From: Filipe Brandenburger <hidden>
Date: 2014-09-17 13:48:35
Also in: lkml

Hi,

On Wed, Sep 17, 2014 at 1:46 AM, H. Peter Anvin [off-list ref] wrote:
Why would we need/want per process vvar contents?  It seems better to
have the code swapped out.
We are looking at the migration use case (CRIU).

In specific, we want to make CLOCK_MONOTONIC keep the "monotonic"
promise after migration. In order to accomplish that, we may need to
add an offset to CLOCK_MONOTONIC calls after migration.

By keeping a per process vvar page we should be able to implement that
without having to fallback to a real syscall for calls to
clock_gettime(CLOCK_MONOTONIC).

One other thought was that we could use this process vvar page to
expose a migration counter that would get incremented after migration.
That way we could allow (some) userspace tasks (and possibly some VDSO
routines) to use RDTSC but check the contents of that counter
before/after taking measurements to check whether the elapsed time is
valid or not. That means we could still provide tasks with a fast time
counter if they really need one.

Cheers,
Filipe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help