diff mbox

[02/38] qemu-doc: Fix ivshmem huge page example

Message ID 1456771254-17511-3-git-send-email-armbru@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Markus Armbruster Feb. 29, 2016, 6:40 p.m. UTC
Option parameter "share" is missing.  Without it, you get a *private*
mmap(), which defeats ivshmem's purpose pretty thoroughly ;)

While there, switch to the conventional mountpoint of hugetlbfs
/dev/hugepages.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qemu-doc.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marc-André Lureau March 1, 2016, 10:51 a.m. UTC | #1
On Mon, Feb 29, 2016 at 7:40 PM, Markus Armbruster <armbru@redhat.com> wrote:
> Option parameter "share" is missing.  Without it, you get a *private*
> mmap(), which defeats ivshmem's purpose pretty thoroughly ;)
>
> While there, switch to the conventional mountpoint of hugetlbfs
> /dev/hugepages.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>


> ---
>  qemu-doc.texi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qemu-doc.texi b/qemu-doc.texi
> index bc9dd13..65f3b29 100644
> --- a/qemu-doc.texi
> +++ b/qemu-doc.texi
> @@ -1311,7 +1311,7 @@ Instead of specifying the <shm size> using POSIX shm, you may specify
>  a memory backend that has hugepage support:
>
>  @example
> -qemu-system-i386 -object memory-backend-file,size=1G,mem-path=/mnt/hugepages/my-shmem-file,id=mb1
> +qemu-system-i386 -object memory-backend-file,size=1G,mem-path=/dev/hugepages/my-shmem-file,share,id=mb1
>                   -device ivshmem,x-memdev=mb1
>  @end example
>
> --
> 2.4.3
>
>
Paolo Bonzini March 1, 2016, 11:35 a.m. UTC | #2
On 29/02/2016 19:40, Markus Armbruster wrote:
> Option parameter "share" is missing.  Without it, you get a *private*
> mmap(), which defeats ivshmem's purpose pretty thoroughly ;)
> 
> While there, switch to the conventional mountpoint of hugetlbfs
> /dev/hugepages.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  qemu-doc.texi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/qemu-doc.texi b/qemu-doc.texi
> index bc9dd13..65f3b29 100644
> --- a/qemu-doc.texi
> +++ b/qemu-doc.texi
> @@ -1311,7 +1311,7 @@ Instead of specifying the <shm size> using POSIX shm, you may specify
>  a memory backend that has hugepage support:
>  
>  @example
> -qemu-system-i386 -object memory-backend-file,size=1G,mem-path=/mnt/hugepages/my-shmem-file,id=mb1
> +qemu-system-i386 -object memory-backend-file,size=1G,mem-path=/dev/hugepages/my-shmem-file,share,id=mb1
>                   -device ivshmem,x-memdev=mb1
>  @end example
>  
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
diff mbox

Patch

diff --git a/qemu-doc.texi b/qemu-doc.texi
index bc9dd13..65f3b29 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -1311,7 +1311,7 @@  Instead of specifying the <shm size> using POSIX shm, you may specify
 a memory backend that has hugepage support:
 
 @example
-qemu-system-i386 -object memory-backend-file,size=1G,mem-path=/mnt/hugepages/my-shmem-file,id=mb1
+qemu-system-i386 -object memory-backend-file,size=1G,mem-path=/dev/hugepages/my-shmem-file,share,id=mb1
                  -device ivshmem,x-memdev=mb1
 @end example