Le 25/03/2018 à 17:27, Joerg Sonnenberger a écrit :
On Sun, Mar 25, 2018 at 03:19:28PM -0000, Michael van Elst wrote:
[email protected] (Joerg Sonnenberger) writes:

What about having a passive unmap as fourth option? I.e. when unmapping
in the transfer map, just add them to a FIFO. Process the FIFO on each
CPU when there is time or the transfer map runs out of space. Context
switching for example would be a natural place to do any such
invalidation.

The mapping is so temporary that it is almost only used on a single CPU.
Basically it's:

win = ubc_alloc();
if (!uiomove(win, ...))
        memset(win, 0, ...);
ubc_release(win, ...);

For this to be even visible on multiple CPUs, the thread would need
to migrate to another CPU. Locking down the LWP on a single CPU
might be the cheapest solution.

Yeah, that's what ephemeral mappings where supposed to be for.

emaps are read-only.

The other question is whether we can't just use the direct map for this
on amd64 and similar platforms?

no, because nothing guarantees the physical pages are contiguous.

Reply via email to