Re: [vmw_vmci 11/11] Apply the header code to make VMCI build

2012-08-15 Thread Jan Engelhardt
On Thursday 2012-08-02 22:22, Sam Ravnborg wrote: >> On Friday 2012-07-27 12:34, Sam Ravnborg wrote: >> >> +#ifndef _VMCI_COMMONINT_H_ >> >> +#define _VMCI_COMMONINT_H_ >> >> + >> >> +#include >> >> +#include >> > >> >Use inverse chrismas tree here. >> >Longer include lines first, and soret alph

Re: [PATCH v7 2/4] virtio_balloon: introduce migration primitives to balloon pages

2012-08-15 Thread Rik van Riel
On 08/14/2012 05:38 PM, Michael S. Tsirkin wrote: And even ignoring that, global pointer to a device is an ugly hack and ugly hacks tend to explode. And even ignoring estetics, and if we decide we are fine with a single balloon, it needs to fail gracefully not crash like it does now. Fair eno

Re: [PATCH v7 2/4] virtio_balloon: introduce migration primitives to balloon pages

2012-08-15 Thread Michael S. Tsirkin
On Wed, Aug 15, 2012 at 09:34:58AM -0300, Rafael Aquini wrote: > On Tue, Aug 14, 2012 at 10:31:09PM +0300, Michael S. Tsirkin wrote: > > > > now CPU1 executes the next instruction: > > > > > > > > } > > > > > > > > which would normally return to function's caller, > > > > but it has been overwrit

Re: [PATCH v7 2/4] virtio_balloon: introduce migration primitives to balloon pages

2012-08-15 Thread Rafael Aquini
On Tue, Aug 14, 2012 at 10:31:09PM +0300, Michael S. Tsirkin wrote: > > > now CPU1 executes the next instruction: > > > > > > } > > > > > > which would normally return to function's caller, > > > but it has been overwritten by CPU2 so we get corruption. > > > > > > No? > > > > At the point CPU2

Re: [PATCH v7 2/4] virtio_balloon: introduce migration primitives to balloon pages

2012-08-15 Thread Michael S. Tsirkin
On Wed, Aug 15, 2012 at 12:16:51PM +0100, Mel Gorman wrote: > On Wed, Aug 15, 2012 at 01:01:08PM +0300, Michael S. Tsirkin wrote: > > On Wed, Aug 15, 2012 at 10:48:39AM +0100, Mel Gorman wrote: > > > On Wed, Aug 15, 2012 at 12:25:28PM +0300, Michael S. Tsirkin wrote: > > > > On Wed, Aug 15, 2012 at

Re: [PATCH v7 2/4] virtio_balloon: introduce migration primitives to balloon pages

2012-08-15 Thread Mel Gorman
On Wed, Aug 15, 2012 at 01:01:08PM +0300, Michael S. Tsirkin wrote: > On Wed, Aug 15, 2012 at 10:48:39AM +0100, Mel Gorman wrote: > > On Wed, Aug 15, 2012 at 12:25:28PM +0300, Michael S. Tsirkin wrote: > > > On Wed, Aug 15, 2012 at 10:05:28AM +0100, Mel Gorman wrote: > > > > On Tue, Aug 14, 2012 at

Re: [PATCH v7 2/4] virtio_balloon: introduce migration primitives to balloon pages

2012-08-15 Thread Michael S. Tsirkin
On Wed, Aug 15, 2012 at 10:48:39AM +0100, Mel Gorman wrote: > On Wed, Aug 15, 2012 at 12:25:28PM +0300, Michael S. Tsirkin wrote: > > On Wed, Aug 15, 2012 at 10:05:28AM +0100, Mel Gorman wrote: > > > On Tue, Aug 14, 2012 at 05:11:13PM -0300, Rafael Aquini wrote: > > > > On Tue, Aug 14, 2012 at 10:5

Re: [PATCH v7 2/4] virtio_balloon: introduce migration primitives to balloon pages

2012-08-15 Thread Mel Gorman
On Wed, Aug 15, 2012 at 12:25:28PM +0300, Michael S. Tsirkin wrote: > On Wed, Aug 15, 2012 at 10:05:28AM +0100, Mel Gorman wrote: > > On Tue, Aug 14, 2012 at 05:11:13PM -0300, Rafael Aquini wrote: > > > On Tue, Aug 14, 2012 at 10:51:39PM +0300, Michael S. Tsirkin wrote: > > > > What I think you sho

Re: [PATCH v7 2/4] virtio_balloon: introduce migration primitives to balloon pages

2012-08-15 Thread Michael S. Tsirkin
On Wed, Aug 15, 2012 at 10:05:28AM +0100, Mel Gorman wrote: > On Tue, Aug 14, 2012 at 05:11:13PM -0300, Rafael Aquini wrote: > > On Tue, Aug 14, 2012 at 10:51:39PM +0300, Michael S. Tsirkin wrote: > > > What I think you should do is use rcu for access. > > > And here sync rcu before freeing. > > >

Re: [PATCH v7 2/4] virtio_balloon: introduce migration primitives to balloon pages

2012-08-15 Thread Mel Gorman
On Tue, Aug 14, 2012 at 05:11:13PM -0300, Rafael Aquini wrote: > On Tue, Aug 14, 2012 at 10:51:39PM +0300, Michael S. Tsirkin wrote: > > What I think you should do is use rcu for access. > > And here sync rcu before freeing. > > Maybe an overkill but at least a documented synchronization > > primit

Re: [PATCH v7 1/4] mm: introduce compaction and migration for virtio ballooned pages

2012-08-15 Thread Mel Gorman
On Tue, Aug 14, 2012 at 05:00:49PM -0300, Rafael Aquini wrote: > On Tue, Aug 14, 2012 at 10:35:25PM +0300, Michael S. Tsirkin wrote: > > > > > +/* __isolate_lru_page() counterpart for a ballooned page */ > > > > > +bool isolate_balloon_page(struct page *page) > > > > > +{ > > > > > + if (WARN_O