mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leonardo Bras <leonardo@linux.ibm.com>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Subject: Question about vmsplice + SPLICE_F_GIFT
Date: Tue, 23 Jul 2019 17:33:24 -0300	[thread overview]
Message-ID: <ae19f8ddc770135572323dd431d0efbe3e419582.camel@linux.ibm.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]

Hello everybody,

I am not sure if this is the right place to be asking this. If is not,
I apologize for the inconvenience. Also, please tell me where is a
better way to as these questions.

I am trying to create a basic C code to test vmsplice + SPLICE_F_GIFT
for moving memory pages between two processes without copying.

I have followed the man pages and several recipes across the web, but I
could not reproduce it yet.

Basically, I am doing:
Sending process:
- malloc + memcpy for generating pages to transfer
- vmsplice with SPLICE_F_GIFT sending over named pipe (in a loop)
Receiving process:
- Create mmaped file to receive the pages
- splice with SPLICE_F_MOVE receiving from named pipe (in a loop)

I have seen the SPLICE_F_MOVE being used on steal ops from the
'pipebuffer', but I couldn't find a way to call it from splice.

Questions: 
It does what I think it does? (reassign memory pages from a process to
another)
If so, does page gifting still works?
If so, is there a basic recipe to test it's workings?

Thank you for reading,

Leonardo Brás 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2019-07-23 20:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-23 20:33 Leonardo Bras [this message]
2019-07-23 20:36 ` Leonardo Bras
2019-07-26  8:52 ` Miklos Szeredi

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=ae19f8ddc770135572323dd431d0efbe3e419582.camel@linux.ibm.com \
    --to=leonardo@linux.ibm.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.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

all inboxes | Powered by JetHome®