mmapped server

"Peter T. Breuer" <[email protected]> Sat, 25 Mar 2006 22:23:51 +0100 (MET)
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
I was just about to wonder out aloud if anyone would mind if I release
enbd 2.4.33, because I had something to try in 2.4.34 ...  I think the
server can mmap its target and thus avoid reading from the net into a
buffer, then writing from the buffer to disk, by mmapping the disk to
the buffer and doing it all in one go.

But it turns out there is already code to do that! Has anyone tried it?

 --mmap,-M

    // PTB try using mmapped target directly first
    if (self->flags & F_MMAP) {
        buffer = server->mmap(server,
                NULL, request->len, PROT_WRITE, MAP_SHARED, request->from);
    }
    // PTB otherwise fall back to the copy buffer.

I must have a go ...

Peter