Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Paolo Bonzini
Il 10/06/2014 13:48, Michael S. Tsirkin ha scritto: Even measurable speedups in most scenarios would not matter. I don't care if a kernel compile takes 2 minutes vs. 110 seconds (for a 10% speedup), even though it's great that THP can speed up such a common task. True. But I am not sure why wo

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Michael S. Tsirkin
On Tue, Jun 10, 2014 at 01:43:27PM +0200, Paolo Bonzini wrote: > Il 10/06/2014 13:35, Michael S. Tsirkin ha scritto: > Why? For example it would be useful for testing on machines that you > don't > have root for, and that do not have a hugetlbfs mount point. For example > you cou

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Paolo Bonzini
Il 10/06/2014 13:35, Michael S. Tsirkin ha scritto: Why? For example it would be useful for testing on machines that you don't have root for, and that do not have a hugetlbfs mount point. For example you could run the test case from the vhost-user's patches. Sounds useful, I guess we could al

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Michael S. Tsirkin
On Tue, Jun 10, 2014 at 01:29:06PM +0200, Paolo Bonzini wrote: > Il 10/06/2014 13:23, Michael S. Tsirkin ha scritto: > >On Tue, Jun 10, 2014 at 01:12:04PM +0200, Paolo Bonzini wrote: > >>Il 10/06/2014 11:59, Michael S. Tsirkin ha scritto: > >What's the point compared to memory-backend-ram? > >>

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Paolo Bonzini
Il 10/06/2014 13:23, Michael S. Tsirkin ha scritto: On Tue, Jun 10, 2014 at 01:12:04PM +0200, Paolo Bonzini wrote: Il 10/06/2014 11:59, Michael S. Tsirkin ha scritto: What's the point compared to memory-backend-ram? That you can use shared memory, for example together with vhost-user. I don

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Michael S. Tsirkin
On Tue, Jun 10, 2014 at 01:12:04PM +0200, Paolo Bonzini wrote: > Il 10/06/2014 11:59, Michael S. Tsirkin ha scritto: > >> >What's the point compared to memory-backend-ram? > >> > >> That you can use shared memory, for example together with vhost-user. > > > >I don't think it's a good idea until THP

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Paolo Bonzini
Il 10/06/2014 11:59, Michael S. Tsirkin ha scritto: > >What's the point compared to memory-backend-ram? > > That you can use shared memory, for example together with vhost-user. I don't think it's a good idea until THP supports shared memory. Why? For example it would be useful for testing on

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Michael S. Tsirkin
On Tue, Jun 10, 2014 at 10:56:42AM +0200, Paolo Bonzini wrote: > Il 10/06/2014 10:30, Hu Tao ha scritto: > >On Tue, Jun 10, 2014 at 01:09:32AM -0400, Paolo Bonzini wrote: > >> > >+#define TYPE_MEMORY_BACKEND_FILE "memory-backend-file" > how about naming it after what it really is? "memory-b

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Michael S. Tsirkin
On Tue, Jun 10, 2014 at 11:07:35AM +0200, Igor Mammedov wrote: > On Tue, 10 Jun 2014 16:30:06 +0800 > Hu Tao wrote: > > > On Tue, Jun 10, 2014 at 01:09:32AM -0400, Paolo Bonzini wrote: > > > > > > > > > +#define TYPE_MEMORY_BACKEND_FILE "memory-backend-file" > > > > > how about naming it after w

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Hu Tao
On Tue, Jun 10, 2014 at 10:56:42AM +0200, Paolo Bonzini wrote: > Il 10/06/2014 10:30, Hu Tao ha scritto: > >On Tue, Jun 10, 2014 at 01:09:32AM -0400, Paolo Bonzini wrote: > >> > >+#define TYPE_MEMORY_BACKEND_FILE "memory-backend-file" > how about naming it after what it really is? "memory-b

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Igor Mammedov
On Tue, 10 Jun 2014 16:30:06 +0800 Hu Tao wrote: > On Tue, Jun 10, 2014 at 01:09:32AM -0400, Paolo Bonzini wrote: > > > > > > > +#define TYPE_MEMORY_BACKEND_FILE "memory-backend-file" > > > > how about naming it after what it really is? "memory-backend-hugepage" > > > > Later we could split it i

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Paolo Bonzini
Il 10/06/2014 10:30, Hu Tao ha scritto: On Tue, Jun 10, 2014 at 01:09:32AM -0400, Paolo Bonzini wrote: +#define TYPE_MEMORY_BACKEND_FILE "memory-backend-file" how about naming it after what it really is? "memory-backend-hugepage" Later we could split it into generic superclass mmap-ed "memory

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-10 Thread Hu Tao
On Tue, Jun 10, 2014 at 01:09:32AM -0400, Paolo Bonzini wrote: > > > > > +#define TYPE_MEMORY_BACKEND_FILE "memory-backend-file" > > > how about naming it after what it really is? "memory-backend-hugepage" > > > Later we could split it into generic superclass mmap-ed > > > "memory-backend-file" an

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-09 Thread Paolo Bonzini
> > > +#define TYPE_MEMORY_BACKEND_FILE "memory-backend-file" > > how about naming it after what it really is? "memory-backend-hugepage" > > Later we could split it into generic superclass mmap-ed > > "memory-backend-file" and have TPH specific code moved into this backend. > > OK. Actually I do

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-09 Thread Hu Tao
On Mon, Jun 09, 2014 at 01:32:46PM +0200, Igor Mammedov wrote: > On Mon, 9 Jun 2014 18:25:23 +0800 > Hu Tao wrote: > > > From: Paolo Bonzini > > > > Signed-off-by: Paolo Bonzini > > Signed-off-by: Hu Tao > > --- > > backends/Makefile.objs | 1 + > > backends/hostmem-file.c | 107 > >

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-09 Thread Igor Mammedov
On Mon, 9 Jun 2014 14:35:53 +0300 "Michael S. Tsirkin" wrote: > On Mon, Jun 09, 2014 at 01:32:46PM +0200, Igor Mammedov wrote: > > On Mon, 9 Jun 2014 18:25:23 +0800 > > Hu Tao wrote: > > > > > From: Paolo Bonzini > > > > > > Signed-off-by: Paolo Bonzini > > > Signed-off-by: Hu Tao > > > ---

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-09 Thread Michael S. Tsirkin
On Mon, Jun 09, 2014 at 01:32:46PM +0200, Igor Mammedov wrote: > On Mon, 9 Jun 2014 18:25:23 +0800 > Hu Tao wrote: > > > From: Paolo Bonzini > > > > Signed-off-by: Paolo Bonzini > > Signed-off-by: Hu Tao > > --- > > backends/Makefile.objs | 1 + > > backends/hostmem-file.c | 107 > >

Re: [Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-09 Thread Igor Mammedov
On Mon, 9 Jun 2014 18:25:23 +0800 Hu Tao wrote: > From: Paolo Bonzini > > Signed-off-by: Paolo Bonzini > Signed-off-by: Hu Tao > --- > backends/Makefile.objs | 1 + > backends/hostmem-file.c | 107 > > 2 files changed, 108 insertions(+) >

[Qemu-devel] [PATCH v4 18/29] hostmem: add file-based HostMemoryBackend

2014-06-09 Thread Hu Tao
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Hu Tao --- backends/Makefile.objs | 1 + backends/hostmem-file.c | 107 2 files changed, 108 insertions(+) create mode 100644 backends/hostmem-file.c diff --git a/backends/Make