Re: [Qemu-devel] [PATCH v3] memory: reduce heap Rss size around 3M

2017-03-15 Thread Peter Maydell
On 15 March 2017 at 12:49, Zhong, Yang wrote: > So we can omit the cpu-memory address space allocated in the > address_space_init_shareable(), which will same around 3M physical memory. I see what you want to do... > Maybe the below patch is much better, please help review, thanks! > > diff --g

Re: [Qemu-devel] [PATCH v3] memory: reduce heap Rss size around 3M

2017-03-15 Thread Zhong, Yang
Hello Peter, The cpu-memory and memory have same address space through info mtree tool. address-space: memory - (prio 0, i/o): system -7fff (prio 0, i/o): alias ram-below-4g @pc.ram -7fff 00

Re: [Qemu-devel] [PATCH v3] memory: reduce heap Rss size around 3M

2017-03-15 Thread Peter Maydell
On 15 March 2017 at 08:12, Paolo Bonzini wrote: > > > On 15/03/2017 14:39, Yang Zhong wrote: >> Since cpu-memory and memory have same address space,one malloced >> memory is enough. This patch will skip memory malloc for memory >> address space,which will reduce around 3M physical memory in heap.

Re: [Qemu-devel] [PATCH v3] memory: reduce heap Rss size around 3M

2017-03-15 Thread Zhong, Yang
Hello Paolo&peter, Maybe below patch is much more better, I also did the verification. Please all of you give some comments, many thanks! diff --git a/memory.c b/memory.c index 64b0a60..230f2cb 100644 --- a/memory.c +++ b/memory.c @@ -2422,7 +2422,7 @@ AddressSpace *address_space_init_shareable(

Re: [Qemu-devel] [PATCH v3] memory: reduce heap Rss size around 3M

2017-03-15 Thread Paolo Bonzini
On 15/03/2017 14:39, Yang Zhong wrote: > Since cpu-memory and memory have same address space,one malloced > memory is enough. This patch will skip memory malloc for memory > address space,which will reduce around 3M physical memory in heap. > > Signed-off-by: Yang Zhong > --- > memory.c | 2 +-

[Qemu-devel] [PATCH v3] memory: reduce heap Rss size around 3M

2017-03-14 Thread Yang Zhong
Since cpu-memory and memory have same address space,one malloced memory is enough. This patch will skip memory malloc for memory address space,which will reduce around 3M physical memory in heap. Signed-off-by: Yang Zhong --- memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -