Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-22 Thread Xu, Anthony
> So please send it to the list with Signed-off-by line. Thanks, > > DPRINTF("handle_mmio\n"); > /* Called outside BQL */ > address_space_rw(_space_memory, > run->mmio.phys_addr, attrs, >

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-22 Thread Paolo Bonzini
On 16/03/2017 21:02, Xu, Anthony wrote: >>> memory_region_finalize. >>> Let me know if you think otherwise. >> >> Yes, you can replace memory_region_del_subregion in >> memory_region_finalize >> with special code that does >> >> assert(!mr->enabled); >> assert(subregion->container ==

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-16 Thread Xu, Anthony
> > memory_region_finalize. > > Let me know if you think otherwise. > > Yes, you can replace memory_region_del_subregion in > memory_region_finalize > with special code that does > > assert(!mr->enabled); > assert(subregion->container == mr); > subregion->container = NULL; >

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-15 Thread Zhong, Yang
;Yang Zhong" <yang.zh...@intel.com>, "Chao P Peng" > <chao.p.p...@intel.com>, qemu-devel@nongnu.org > Sent: Wednesday, March 15, 2017 8:05:48 PM > Subject: Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size > from 12252kB to 2752KB > > >

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-15 Thread Paolo Bonzini
.org > Sent: Wednesday, March 15, 2017 8:05:48 PM > Subject: Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from > 12252kB to 2752KB > > > The first unref is done after as->current_map is overwritten. > > as->current_map is accessed under RCU, so it needs

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-15 Thread Xu, Anthony
> The first unref is done after as->current_map is overwritten. > as->current_map is accessed under RCU, so it needs call_rcu. It > balances the initial reference that is present since flatview_init. Got it, thanks for explanation. > > but it is not clear to me, is this a bug or by design? Is

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-15 Thread Paolo Bonzini
On 14/03/2017 22:23, Xu, Anthony wrote: >> flatview_unref can call object_unref and thus reach: > > Okay, flatview_unref is the one you worried about, > > Flatview_unref is registered as a RCU callback only in > address_space_update_topology, > Strangely, it is registered as a RCU callback,

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-14 Thread Xu, Anthony
l.com> > Subject: Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from > 12252kB to 2752KB > > > > On 14/03/2017 06:14, Xu, Anthony wrote: > > Below functions are registered in RCU thread > > address_space_dispatch_free, > > do_address_sp

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-14 Thread Paolo Bonzini
On 14/03/2017 06:14, Xu, Anthony wrote: > Below functions are registered in RCU thread > address_space_dispatch_free, > do_address_space_destroy > flatview_unref > reclaim_ramblock, > qht_map_destroy, > migration_bitmap_free > > first three are address space related, should work without global

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-13 Thread Xu, Anthony
> > > Subpages never have subregions, so the loop never runs. The > begin/commit > > > pair then becomes: > > > > > > ++memory_region_transaction_depth; > > > --memory_region_transaction_depth; > > > if (!memory_region_transaction_depth) { > > > if

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-11 Thread Paolo Bonzini
> > Subpages never have subregions, so the loop never runs. The begin/commit > > pair then becomes: > > > > ++memory_region_transaction_depth; > > --memory_region_transaction_depth; > > if (!memory_region_transaction_depth) { > > if (memory_region_update_pending) { > >

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-10 Thread Xu, Anthony
> -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Friday, March 10, 2017 1:14 AM > To: Zhong, Yang ; qemu-devel@nongnu.org > Cc: Xu, Anthony ; Peng, Chao P > > Subject: Re: [PATCH v1 2/2]

Re: [Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-10 Thread Paolo Bonzini
On 10/03/2017 16:14, Yang Zhong wrote: > There is no need to delete subregion and do memory begin/commit for > subpage in memory_region_finalize(). > > This patch is from Anthony Xu . > > Signed-off-by: Yang Zhong > --- > memory.c | 13

[Qemu-devel] [PATCH v1 2/2] reduce qemu's heap Rss size from 12252kB to 2752KB

2017-03-09 Thread Yang Zhong
There is no need to delete subregion and do memory begin/commit for subpage in memory_region_finalize(). This patch is from Anthony Xu . Signed-off-by: Yang Zhong --- memory.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff