Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-25 Thread Rafael Aquini
On Tue, Sep 25, 2012 at 03:05:49AM +0200, Michael S. Tsirkin wrote: > If these are all under page lock these barriers just confuse things, > because they are almost never enough by themselves. > So in that case it would be better to drop them and document > usage as you are going to. > Would the

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-25 Thread Rafael Aquini
On Tue, Sep 25, 2012 at 03:05:49AM +0200, Michael S. Tsirkin wrote: If these are all under page lock these barriers just confuse things, because they are almost never enough by themselves. So in that case it would be better to drop them and document usage as you are going to. Would the

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-24 Thread Michael S. Tsirkin
On Tue, Sep 18, 2012 at 01:24:21PM -0300, Rafael Aquini wrote: > > > +static inline void assign_balloon_mapping(struct page *page, > > > + struct address_space *mapping) > > > +{ > > > + page->mapping = mapping; > > > + smp_wmb(); > > > +} > > > + > > > +static

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-24 Thread Peter Zijlstra
On Mon, 2012-09-17 at 13:38 -0300, Rafael Aquini wrote: > +static inline void assign_balloon_mapping(struct page *page, > + struct address_space > *mapping) > +{ > + page->mapping = mapping; > + smp_wmb(); > +} > + > +static inline void

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-24 Thread Peter Zijlstra
On Mon, 2012-09-17 at 13:38 -0300, Rafael Aquini wrote: +static inline void assign_balloon_mapping(struct page *page, + struct address_space *mapping) +{ + page-mapping = mapping; + smp_wmb(); +} + +static inline void

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-24 Thread Michael S. Tsirkin
On Tue, Sep 18, 2012 at 01:24:21PM -0300, Rafael Aquini wrote: +static inline void assign_balloon_mapping(struct page *page, + struct address_space *mapping) +{ + page-mapping = mapping; + smp_wmb(); +} + +static inline void

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-18 Thread Andrew Morton
On Tue, 18 Sep 2012 13:24:21 -0300 Rafael Aquini wrote: > On Mon, Sep 17, 2012 at 03:15:43PM -0700, Andrew Morton wrote: > > > +/* return code to identify when a ballooned page has been migrated */ > > > +#define BALLOON_MIGRATION_RETURN 0xba1100 > > > > I didn't really spend enough time to

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-18 Thread Rafael Aquini
On Mon, Sep 17, 2012 at 03:15:43PM -0700, Andrew Morton wrote: > > +/* return code to identify when a ballooned page has been migrated */ > > +#define BALLOON_MIGRATION_RETURN 0xba1100 > > I didn't really spend enough time to work out why this was done this > way, but I know a hack when I see

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-18 Thread Rafael Aquini
On Mon, Sep 17, 2012 at 03:15:43PM -0700, Andrew Morton wrote: +/* return code to identify when a ballooned page has been migrated */ +#define BALLOON_MIGRATION_RETURN 0xba1100 I didn't really spend enough time to work out why this was done this way, but I know a hack when I see one!

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-18 Thread Andrew Morton
On Tue, 18 Sep 2012 13:24:21 -0300 Rafael Aquini aqu...@redhat.com wrote: On Mon, Sep 17, 2012 at 03:15:43PM -0700, Andrew Morton wrote: +/* return code to identify when a ballooned page has been migrated */ +#define BALLOON_MIGRATION_RETURN 0xba1100 I didn't really spend enough time

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-17 Thread Andrew Morton
On Mon, 17 Sep 2012 13:38:16 -0300 Rafael Aquini wrote: > Memory fragmentation introduced by ballooning might reduce significantly > the number of 2MB contiguous memory blocks that can be used within a guest, > thus imposing performance penalties associated with the reduced number of >

[PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-17 Thread Rafael Aquini
Memory fragmentation introduced by ballooning might reduce significantly the number of 2MB contiguous memory blocks that can be used within a guest, thus imposing performance penalties associated with the reduced number of transparent huge pages that could be used by the guest workload. This

[PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-17 Thread Rafael Aquini
Memory fragmentation introduced by ballooning might reduce significantly the number of 2MB contiguous memory blocks that can be used within a guest, thus imposing performance penalties associated with the reduced number of transparent huge pages that could be used by the guest workload. This

Re: [PATCH v10 1/5] mm: introduce a common interface for balloon pages mobility

2012-09-17 Thread Andrew Morton
On Mon, 17 Sep 2012 13:38:16 -0300 Rafael Aquini aqu...@redhat.com wrote: Memory fragmentation introduced by ballooning might reduce significantly the number of 2MB contiguous memory blocks that can be used within a guest, thus imposing performance penalties associated with the reduced number