On Sun, Aug 26, 2012 at 10:42:44AM +0300, Michael S. Tsirkin wrote:
Reading two atomics and doing math? Result can even be negative.
I did not look at use closely but it looks suspicious.
Doc on atomic_read says:
The read is atomic in that the return value is guaranteed to be one of the
On Sun, Aug 26, 2012 at 06:44:23PM +0300, Michael S. Tsirkin wrote:
I am simply asking how was this patchset tested.
It would be nice to have this info in commit log.
Since this is an optimization patch it is strange
to see one with no numbers at all.
For example, you probably run some
On Sun, Aug 26, 2012 at 10:55:58AM +0300, Michael S. Tsirkin wrote:
On Sat, Aug 25, 2012 at 02:24:56AM -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
queue operations;
- pages_lock (spinlock): special protection to balloon's pages bookmarking
elements (list and atomic counters) against the
potential memory compaction concurrency;
Signed-off-by: Rafael Aquini
---
drivers/virtio
This patch introduces a new set of vm event counters to keep track of
ballooned pages compaction activity.
Signed-off-by: Rafael Aquini
---
drivers/virtio/virtio_balloon.c | 1 +
include/linux/vm_event_item.h | 8 +++-
mm/balloon_compaction.c | 2 ++
mm/migrate.c
this patch introduces
putback_movable_pages() to properly cope with cases where the isolated
pageset contains ballooned pages and LRU pages, thus fixing the mentioned
inelegant hack around putback_lru_pages().
Signed-off-by: Rafael Aquini
---
include/linux/migrate.h | 2 ++
mm/compaction.c |
.
This patch introduces a common interface to help a balloon driver on
making its page set movable to compaction, and thus allowing the system
to better leverage the compation efforts on memory defragmentation.
Signed-off-by: Rafael Aquini
---
include/linux/balloon_compaction.h | 137
ose
subsystems aware of ballooned pages and allow memory balloon pages become
movable within a guest, thus avoiding the aforementioned fragmentation issue
Rafael Aquini (5):
mm: introduce a common interface for balloon pages mobility
mm: introduce compaction and migration for ballooned pages
.
This patch introduces the helper functions as well as the necessary changes
to teach compaction and migration bits how to cope with pages which are
part of a guest memory balloon, in order to make them movable by memory
compaction procedures.
Signed-off-by: Rafael Aquini
---
mm/compaction.c | 47
.
This patch introduces the helper functions as well as the necessary changes
to teach compaction and migration bits how to cope with pages which are
part of a guest memory balloon, in order to make them movable by memory
compaction procedures.
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
mm
aware of ballooned pages and allow memory balloon pages become
movable within a guest, thus avoiding the aforementioned fragmentation issue
Rafael Aquini (5):
mm: introduce a common interface for balloon pages mobility
mm: introduce compaction and migration for ballooned pages
virtio_balloon
.
This patch introduces a common interface to help a balloon driver on
making its page set movable to compaction, and thus allowing the system
to better leverage the compation efforts on memory defragmentation.
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
include/linux/balloon_compaction.h | 137
putback_movable_pages() to properly cope with cases where the isolated
pageset contains ballooned pages and LRU pages, thus fixing the mentioned
inelegant hack around putback_lru_pages().
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
include/linux/migrate.h | 2 ++
mm/compaction.c
This patch introduces a new set of vm event counters to keep track of
ballooned pages compaction activity.
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
drivers/virtio/virtio_balloon.c | 1 +
include/linux/vm_event_item.h | 8 +++-
mm/balloon_compaction.c | 2 ++
mm
queue operations;
- pages_lock (spinlock): special protection to balloon's pages bookmarking
elements (list and atomic counters) against the
potential memory compaction concurrency;
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
drivers
On Thu, Aug 23, 2012 at 09:38:48PM -0300, Rafael Aquini wrote:
> On Thu, Aug 23, 2012 at 09:33:53PM -0300, Rafael Aquini wrote:
> > On Fri, Aug 24, 2012 at 02:36:16AM +0300, Michael S. Tsirkin wrote:
> > > I would wake it each time after adding a page, then it
> > > can
On Thu, Aug 23, 2012 at 09:33:53PM -0300, Rafael Aquini wrote:
> On Fri, Aug 24, 2012 at 02:36:16AM +0300, Michael S. Tsirkin wrote:
> > I would wake it each time after adding a page, then it
> > can stop waiting when it leaks enough.
> > But again, it's cleaner to just keep t
On Fri, Aug 24, 2012 at 02:36:16AM +0300, Michael S. Tsirkin wrote:
> I would wake it each time after adding a page, then it
> can stop waiting when it leaks enough.
> But again, it's cleaner to just keep tracking all
> pages, let mm hang on to them by keeping a reference.
>
Here is a rough idea
On Fri, Aug 24, 2012 at 02:36:16AM +0300, Michael S. Tsirkin wrote:
> On Thu, Aug 23, 2012 at 02:28:45PM -0300, Rafael Aquini wrote:
> > On Thu, Aug 23, 2012 at 07:25:05PM +0300, Michael S. Tsirkin wrote:
> > > On Thu, Aug 23, 2012 at 04:53:28PM +0300, Michael S. Tsirkin wrote:
On Thu, Aug 23, 2012 at 07:25:05PM +0300, Michael S. Tsirkin wrote:
> On Thu, Aug 23, 2012 at 04:53:28PM +0300, Michael S. Tsirkin wrote:
> > Basically it was very simple: we assumed page->lru was never
> > touched for an allocated page, so it's safe to use it for
> > internal book-keeping by the
On Thu, Aug 23, 2012 at 12:03:15PM -0400, Rik van Riel wrote:
> >
> >Not "longer" - apparently forever unless user resend the leak command.
> >It's wrong - it should
> >1. not tell host if nothing was done
> >2. after migration finished leak and tell host
>
> Agreed. If the balloon is told to
On Thu, Aug 23, 2012 at 04:53:29PM +0300, Michael S. Tsirkin wrote:
> On Thu, Aug 23, 2012 at 10:06:07AM -0300, Rafael Aquini wrote:
> > On Thu, Aug 23, 2012 at 03:34:32PM +0300, Michael S. Tsirkin wrote:
> > > > So, nothing has changed here.
> > >
> >
On Thu, Aug 23, 2012 at 03:34:32PM +0300, Michael S. Tsirkin wrote:
> > So, nothing has changed here.
>
> Yes, your patch does change things:
> leak_balloon now might return without freeing any pages.
> In that case we will not be making any progress, and just
> spin, pinning CPU.
That's a
On Thu, Aug 23, 2012 at 01:01:07PM +0300, Michael S. Tsirkin wrote:
> > So, when remove_common() calls leak_balloon() looping on
> > vb->num_pages, that won't become a tight loop.
> > The scheme was apparently working before this series, and it will remain
> > working
> > after it.
>
> It seems
On Thu, Aug 23, 2012 at 01:01:07PM +0300, Michael S. Tsirkin wrote:
So, when remove_common() calls leak_balloon() looping on
vb-num_pages, that won't become a tight loop.
The scheme was apparently working before this series, and it will remain
working
after it.
It seems that before
On Thu, Aug 23, 2012 at 03:34:32PM +0300, Michael S. Tsirkin wrote:
So, nothing has changed here.
Yes, your patch does change things:
leak_balloon now might return without freeing any pages.
In that case we will not be making any progress, and just
spin, pinning CPU.
That's a transitory
On Thu, Aug 23, 2012 at 04:53:29PM +0300, Michael S. Tsirkin wrote:
On Thu, Aug 23, 2012 at 10:06:07AM -0300, Rafael Aquini wrote:
On Thu, Aug 23, 2012 at 03:34:32PM +0300, Michael S. Tsirkin wrote:
So, nothing has changed here.
Yes, your patch does change things:
leak_balloon now
On Thu, Aug 23, 2012 at 12:03:15PM -0400, Rik van Riel wrote:
Not longer - apparently forever unless user resend the leak command.
It's wrong - it should
1. not tell host if nothing was done
2. after migration finished leak and tell host
Agreed. If the balloon is told to leak N pages,
On Thu, Aug 23, 2012 at 07:25:05PM +0300, Michael S. Tsirkin wrote:
On Thu, Aug 23, 2012 at 04:53:28PM +0300, Michael S. Tsirkin wrote:
Basically it was very simple: we assumed page-lru was never
touched for an allocated page, so it's safe to use it for
internal book-keeping by the driver.
On Fri, Aug 24, 2012 at 02:36:16AM +0300, Michael S. Tsirkin wrote:
On Thu, Aug 23, 2012 at 02:28:45PM -0300, Rafael Aquini wrote:
On Thu, Aug 23, 2012 at 07:25:05PM +0300, Michael S. Tsirkin wrote:
On Thu, Aug 23, 2012 at 04:53:28PM +0300, Michael S. Tsirkin wrote:
Basically it was very
On Fri, Aug 24, 2012 at 02:36:16AM +0300, Michael S. Tsirkin wrote:
I would wake it each time after adding a page, then it
can stop waiting when it leaks enough.
But again, it's cleaner to just keep tracking all
pages, let mm hang on to them by keeping a reference.
Here is a rough idea on
On Thu, Aug 23, 2012 at 09:33:53PM -0300, Rafael Aquini wrote:
On Fri, Aug 24, 2012 at 02:36:16AM +0300, Michael S. Tsirkin wrote:
I would wake it each time after adding a page, then it
can stop waiting when it leaks enough.
But again, it's cleaner to just keep tracking all
pages, let mm
On Thu, Aug 23, 2012 at 09:38:48PM -0300, Rafael Aquini wrote:
On Thu, Aug 23, 2012 at 09:33:53PM -0300, Rafael Aquini wrote:
On Fri, Aug 24, 2012 at 02:36:16AM +0300, Michael S. Tsirkin wrote:
I would wake it each time after adding a page, then it
can stop waiting when it leaks enough
On Wed, Aug 22, 2012 at 12:33:17PM +0300, Michael S. Tsirkin wrote:
> Hmm, so this will busy wait which is unelegant.
> We need some event IMO.
No, it does not busy wait. leak_balloon() is mutual exclusive with migration
steps, so for the case we have one racing against the other, we really want
On Wed, Aug 22, 2012 at 12:33:17PM +0300, Michael S. Tsirkin wrote:
Hmm, so this will busy wait which is unelegant.
We need some event IMO.
No, it does not busy wait. leak_balloon() is mutual exclusive with migration
steps, so for the case we have one racing against the other, we really want
On Wed, Aug 22, 2012 at 03:07:41AM +0300, Michael S. Tsirkin wrote:
> On Tue, Aug 21, 2012 at 05:45:56PM -0300, Rafael Aquini wrote:
> > On Tue, Aug 21, 2012 at 10:30:31PM +0300, Michael S. Tsirkin wrote:
> > > On Tue, Aug 21, 2012 at 04:23:58PM -0300, Rafael Aquini wrote:
>
On Tue, Aug 21, 2012 at 10:30:31PM +0300, Michael S. Tsirkin wrote:
> On Tue, Aug 21, 2012 at 04:23:58PM -0300, Rafael Aquini wrote:
> > On Tue, Aug 21, 2012 at 10:13:30PM +0300, Michael S. Tsirkin wrote:
> > > >
> > > > I believe rcu_dereference_protected(
On Tue, Aug 21, 2012 at 10:16:12PM +0300, Michael S. Tsirkin wrote:
> On Tue, Aug 21, 2012 at 02:55:03PM -0300, Rafael Aquini wrote:
> > On Tue, Aug 21, 2012 at 04:52:23PM +0300, Michael S. Tsirkin wrote:
> > > > + * address_space_operations utilized method
On Tue, Aug 21, 2012 at 10:13:30PM +0300, Michael S. Tsirkin wrote:
> >
> > I believe rcu_dereference_protected() is what I want/need here, since this
> > code
> > is always called for pages which we hold locked (PG_locked bit).
>
> It would only help if we locked the page while updating the
On Tue, Aug 21, 2012 at 09:24:32AM -0700, Paul E. McKenney wrote:
> On Tue, Aug 21, 2012 at 05:20:11PM +0200, Peter Zijlstra wrote:
> > On Tue, 2012-08-21 at 09:47 -0300, Rafael Aquini wrote:
> > > + mapping = rcu_access_pointer(page->mapping);
>
On Tue, Aug 21, 2012 at 06:41:42PM +0300, Michael S. Tsirkin wrote:
> On Tue, Aug 21, 2012 at 05:16:06PM +0200, Peter Zijlstra wrote:
> > On Tue, 2012-08-21 at 16:52 +0300, Michael S. Tsirkin wrote:
> > > > + rcu_read_lock();
> > > > + mapping =
On Tue, Aug 21, 2012 at 04:52:23PM +0300, Michael S. Tsirkin wrote:
> > + * address_space_operations utilized methods for ballooned pages:
> > + * .migratepage- used to perform balloon's page migration (as is)
> > + * .launder_page - used to isolate a page from balloon's page list
> > +
against
concurrent list handling operations;
- virtio_baloon->pages list handling sync by RCU operations;
Signed-off-by: Rafael Aquini
---
drivers/virtio/virtio_balloon.c | 210 +---
1 file changed, 199 insertions(+), 11 deleti
.
This patch introduces the helper functions as well as the necessary changes
to teach compaction and migration bits how to cope with pages which are
part of a guest memory balloon, in order to make them movable by memory
compaction procedures.
Signed-off-by: Rafael Aquini
---
mm/compaction.c | 47
this patch introduces
putback_movable_pages() to properly cope with cases where the isolated
pageset contains ballooned pages and LRU pages, thus fixing the mentioned
inelegant hack around putback_lru_pages().
Signed-off-by: Rafael Aquini
---
include/linux/migrate.h | 2 ++
mm/compaction.c |
This patch introduces a new set of vm event counters to keep track of
ballooned pages compaction activity.
Signed-off-by: Rafael Aquini
---
drivers/virtio/virtio_balloon.c | 2 ++
include/linux/vm_event_item.h | 8 +++-
mm/balloon_compaction.c | 6 --
mm/migrate.c
.
This patch introduces a common interface to help a balloon driver on
making its page set movable to compaction, and thus allowing the system
to better leverage the compation efforts on memory defragmentation.
Signed-off-by: Rafael Aquini
---
include/linux/balloon_compaction.h | 113
ose
subsystems aware of ballooned pages and allow memory balloon pages become
movable within a guest, thus avoiding the aforementioned fragmentation issue
Rafael Aquini (5):
mm: introduce a common interface for balloon pages mobility
mm: introduce compaction and migration for ballooned pages
On Wed, Aug 22, 2012 at 03:07:41AM +0300, Michael S. Tsirkin wrote:
On Tue, Aug 21, 2012 at 05:45:56PM -0300, Rafael Aquini wrote:
On Tue, Aug 21, 2012 at 10:30:31PM +0300, Michael S. Tsirkin wrote:
On Tue, Aug 21, 2012 at 04:23:58PM -0300, Rafael Aquini wrote:
On Tue, Aug 21, 2012 at 10
aware of ballooned pages and allow memory balloon pages become
movable within a guest, thus avoiding the aforementioned fragmentation issue
Rafael Aquini (5):
mm: introduce a common interface for balloon pages mobility
mm: introduce compaction and migration for ballooned pages
virtio_balloon
.
This patch introduces a common interface to help a balloon driver on
making its page set movable to compaction, and thus allowing the system
to better leverage the compation efforts on memory defragmentation.
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
include/linux/balloon_compaction.h | 113
This patch introduces a new set of vm event counters to keep track of
ballooned pages compaction activity.
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
drivers/virtio/virtio_balloon.c | 2 ++
include/linux/vm_event_item.h | 8 +++-
mm/balloon_compaction.c | 6 --
mm
putback_movable_pages() to properly cope with cases where the isolated
pageset contains ballooned pages and LRU pages, thus fixing the mentioned
inelegant hack around putback_lru_pages().
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
include/linux/migrate.h | 2 ++
mm/compaction.c
.
This patch introduces the helper functions as well as the necessary changes
to teach compaction and migration bits how to cope with pages which are
part of a guest memory balloon, in order to make them movable by memory
compaction procedures.
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
mm
against
concurrent list handling operations;
- virtio_baloon-pages list handling sync by RCU operations;
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
drivers/virtio/virtio_balloon.c | 210 +---
1 file changed, 199 insertions(+), 11
On Tue, Aug 21, 2012 at 04:52:23PM +0300, Michael S. Tsirkin wrote:
+ * address_space_operations utilized methods for ballooned pages:
+ * .migratepage- used to perform balloon's page migration (as is)
+ * .launder_page - used to isolate a page from balloon's page list
+ *
On Tue, Aug 21, 2012 at 06:41:42PM +0300, Michael S. Tsirkin wrote:
On Tue, Aug 21, 2012 at 05:16:06PM +0200, Peter Zijlstra wrote:
On Tue, 2012-08-21 at 16:52 +0300, Michael S. Tsirkin wrote:
+ rcu_read_lock();
+ mapping = rcu_dereference(page-mapping);
+
On Tue, Aug 21, 2012 at 09:24:32AM -0700, Paul E. McKenney wrote:
On Tue, Aug 21, 2012 at 05:20:11PM +0200, Peter Zijlstra wrote:
On Tue, 2012-08-21 at 09:47 -0300, Rafael Aquini wrote:
+ mapping = rcu_access_pointer(page-mapping);
+ if (mapping)
+ mapping
On Tue, Aug 21, 2012 at 10:13:30PM +0300, Michael S. Tsirkin wrote:
I believe rcu_dereference_protected() is what I want/need here, since this
code
is always called for pages which we hold locked (PG_locked bit).
It would only help if we locked the page while updating the mapping,
as
On Tue, Aug 21, 2012 at 10:16:12PM +0300, Michael S. Tsirkin wrote:
On Tue, Aug 21, 2012 at 02:55:03PM -0300, Rafael Aquini wrote:
On Tue, Aug 21, 2012 at 04:52:23PM +0300, Michael S. Tsirkin wrote:
+ * address_space_operations utilized methods for ballooned pages:
+ * .migratepage
On Tue, Aug 21, 2012 at 10:30:31PM +0300, Michael S. Tsirkin wrote:
On Tue, Aug 21, 2012 at 04:23:58PM -0300, Rafael Aquini wrote:
On Tue, Aug 21, 2012 at 10:13:30PM +0300, Michael S. Tsirkin wrote:
I believe rcu_dereference_protected() is what I want/need here, since
this code
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
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 is unloading the module,
On Tue, Aug 14, 2012 at 11:49:06PM +0300, Michael S. Tsirkin wrote:
> On Tue, Aug 14, 2012 at 05:29:50PM -0300, Rafael Aquini wrote:
> > On Tue, Aug 14, 2012 at 11:24:01PM +0300, Michael S. Tsirkin wrote:
> > > On Tue, Aug 14, 2012 at 05:08:31PM -0300, Rafael Aquini wrote:
>
On Tue, Aug 14, 2012 at 11:24:01PM +0300, Michael S. Tsirkin wrote:
> On Tue, Aug 14, 2012 at 05:08:31PM -0300, Rafael Aquini wrote:
> > On Tue, Aug 14, 2012 at 10:59:16PM +0300, Michael S. Tsirkin wrote:
> > > > > > What if there is m
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
> primitive, and it is very light weight.
>
I liked your suggestion on
On Tue, Aug 14, 2012 at 10:59:16PM +0300, Michael S. Tsirkin wrote:
> > > > What if there is more than one balloon device?
> > >
> > > Is it possible to load this driver twice, or are you foreseeing a future
> > > case
> > > where this driver will be able to manage several distinct memory
On Tue, Aug 14, 2012 at 10:48:37PM +0300, Michael S. Tsirkin wrote:
> >
> > E.g. kvm can emulate hyperv so it could in theory have hyperv balloon.
> > This is mm stuff it is best not to tie it to specific drivers.
>
> But of course I agree this is not top priority, no need
> to block submission
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_ON(!movable_balloon_page(page)))
> > >
> > > Looks like this actually
On Tue, Aug 14, 2012 at 11:33:20AM +0300, Michael S. Tsirkin wrote:
> On Tue, Aug 14, 2012 at 09:29:49AM +0930, Rusty Russell wrote:
> > On Mon, 13 Aug 2012 11:41:23 +0300, "Michael S. Tsirkin"
> > wrote:
> > > On Fri, Aug 10, 2012 at 02:
On Mon, Aug 13, 2012 at 11:41:23AM +0300, Michael S. Tsirkin wrote:
> > @@ -141,7 +151,10 @@ static void fill_balloon(struct virtio_balloon *vb,
> > size_t num)
> > set_page_pfns(vb->pfns + vb->num_pfns, page);
> > vb->num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE;
> >
On Mon, Aug 13, 2012 at 11:26:19AM +0300, Michael S. Tsirkin wrote:
> > +static inline bool movable_balloon_page(struct page *page)
> > +{
> > + return (page->mapping && page->mapping == balloon_mapping);
>
> I am guessing this needs smp_read_barrier_depends, and maybe
> ACCESS_ONCE ...
>
I'm
On Mon, Aug 13, 2012 at 11:26:19AM +0300, Michael S. Tsirkin wrote:
+static inline bool movable_balloon_page(struct page *page)
+{
+ return (page-mapping page-mapping == balloon_mapping);
I am guessing this needs smp_read_barrier_depends, and maybe
ACCESS_ONCE ...
I'm curious about
On Mon, Aug 13, 2012 at 11:41:23AM +0300, Michael S. Tsirkin wrote:
@@ -141,7 +151,10 @@ static void fill_balloon(struct virtio_balloon *vb,
size_t num)
set_page_pfns(vb-pfns + vb-num_pfns, page);
vb-num_pages += VIRTIO_BALLOON_PAGES_PER_PAGE;
On Tue, Aug 14, 2012 at 11:33:20AM +0300, Michael S. Tsirkin wrote:
On Tue, Aug 14, 2012 at 09:29:49AM +0930, Rusty Russell wrote:
On Mon, 13 Aug 2012 11:41:23 +0300, Michael S. Tsirkin m...@redhat.com
wrote:
On Fri, Aug 10, 2012 at 02:55:15PM -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_ON(!movable_balloon_page(page)))
Looks like this actually can happen if the page
On Tue, Aug 14, 2012 at 10:48:37PM +0300, Michael S. Tsirkin wrote:
E.g. kvm can emulate hyperv so it could in theory have hyperv balloon.
This is mm stuff it is best not to tie it to specific drivers.
But of course I agree this is not top priority, no need
to block submission on this,
On Tue, Aug 14, 2012 at 10:59:16PM +0300, Michael S. Tsirkin wrote:
What if there is more than one balloon device?
Is it possible to load this driver twice, or are you foreseeing a future
case
where this driver will be able to manage several distinct memory balloons
for
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
primitive, and it is very light weight.
I liked your suggestion on barriers, as
On Tue, Aug 14, 2012 at 11:24:01PM +0300, Michael S. Tsirkin wrote:
On Tue, Aug 14, 2012 at 05:08:31PM -0300, Rafael Aquini wrote:
On Tue, Aug 14, 2012 at 10:59:16PM +0300, Michael S. Tsirkin wrote:
What if there is more than one balloon device?
Is it possible to load
On Tue, Aug 14, 2012 at 11:49:06PM +0300, Michael S. Tsirkin wrote:
On Tue, Aug 14, 2012 at 05:29:50PM -0300, Rafael Aquini wrote:
On Tue, Aug 14, 2012 at 11:24:01PM +0300, Michael S. Tsirkin wrote:
On Tue, Aug 14, 2012 at 05:08:31PM -0300, Rafael Aquini wrote:
On Tue, Aug 14, 2012 at 10
.
This patch introduces the helper functions as well as the necessary changes
to teach compaction and migration bits how to cope with pages which are
part of a guest memory balloon, in order to make them movable by memory
compaction procedures.
Signed-off-by: Rafael Aquini
---
include/linux/mm.h | 17
against
concurrent list handling operations;
Signed-off-by: Rafael Aquini
---
drivers/virtio/virtio_balloon.c | 138 +---
include/linux/virtio_balloon.h | 4 ++
2 files changed, 134 insertions(+), 8 deletions(-)
diff --git a/drivers
this patch introduces
putback_movable_pages() to properly cope with cases where the isolated
pageset contains ballooned pages and LRU pages, thus fixing the mentioned
inelegant hack around putback_lru_pages().
Signed-off-by: Rafael Aquini
---
include/linux/migrate.h | 2 ++
mm/compaction.c |
This patch introduces a new set of vm event counters to keep track of
ballooned pages compaction activity.
Signed-off-by: Rafael Aquini
---
drivers/virtio/virtio_balloon.c | 1 +
include/linux/vm_event_item.h | 8 +++-
mm/compaction.c | 2 ++
mm/migrate.c
ose
subsystems aware of ballooned pages and allow memory balloon pages become
movable within a guest, thus avoiding the aforementioned fragmentation issue
Rafael Aquini (4):
mm: introduce compaction and migration for virtio ballooned pages
virtio_balloon: introduce migration primitives to ball
aware of ballooned pages and allow memory balloon pages become
movable within a guest, thus avoiding the aforementioned fragmentation issue
Rafael Aquini (4):
mm: introduce compaction and migration for virtio ballooned pages
virtio_balloon: introduce migration primitives to balloon pages
mm
This patch introduces a new set of vm event counters to keep track of
ballooned pages compaction activity.
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
drivers/virtio/virtio_balloon.c | 1 +
include/linux/vm_event_item.h | 8 +++-
mm/compaction.c | 2 ++
mm
putback_movable_pages() to properly cope with cases where the isolated
pageset contains ballooned pages and LRU pages, thus fixing the mentioned
inelegant hack around putback_lru_pages().
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
include/linux/migrate.h | 2 ++
mm/compaction.c
against
concurrent list handling operations;
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
drivers/virtio/virtio_balloon.c | 138 +---
include/linux/virtio_balloon.h | 4 ++
2 files changed, 134 insertions(+), 8 deletions(-)
diff
.
This patch introduces the helper functions as well as the necessary changes
to teach compaction and migration bits how to cope with pages which are
part of a guest memory balloon, in order to make them movable by memory
compaction procedures.
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
include/linux
On Thu, Aug 09, 2012 at 11:48:36AM -0300, Rafael Aquini wrote:
> Sure!
> what do you think of:
>
> +/* putback_lru_page() counterpart for a ballooned page */
> +void putback_balloon_page(struct page *page)
> +{
> + lock_page(page);
> + if (!WARN_ON(!m
On Thu, Aug 09, 2012 at 10:00:19AM +0100, Mel Gorman wrote:
> On Wed, Aug 08, 2012 at 07:53:19PM -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
On Thu, Aug 09, 2012 at 10:00:19AM +0100, Mel Gorman wrote:
On Wed, Aug 08, 2012 at 07:53:19PM -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
On Thu, Aug 09, 2012 at 11:48:36AM -0300, Rafael Aquini wrote:
Sure!
what do you think of:
+/* putback_lru_page() counterpart for a ballooned page */
+void putback_balloon_page(struct page *page)
+{
+ lock_page(page);
+ if (!WARN_ON(!movable_balloon_page(page
against
concurrent list handling operations;
Signed-off-by: Rafael Aquini
---
drivers/virtio/virtio_balloon.c | 138 +---
include/linux/virtio_balloon.h | 4 ++
2 files changed, 134 insertions(+), 8 deletions(-)
diff --git a/drivers
ose
subsystems aware of ballooned pages and allow memory balloon pages become
movable within a guest, thus avoiding the aforementioned fragmentation issue
Rafael Aquini (3):
mm: introduce compaction and migration for virtio ballooned pages
virtio_balloon: introduce migration primitives to ball
.
This patch introduces the helper functions as well as the necessary changes
to teach compaction and migration bits how to cope with pages which are
part of a guest memory balloon, in order to make them movable by memory
compaction procedures.
Signed-off-by: Rafael Aquini
---
include/linux/mm.h | 17
This patch is only for testing report purposes and shall be dropped in case of
the rest of this patchset getting accepted for merging.
Signed-off-by: Rafael Aquini
---
drivers/virtio/virtio_balloon.c | 1 +
include/linux/vm_event_item.h | 2 ++
mm/compaction.c | 1 +
mm
This patch is only for testing report purposes and shall be dropped in case of
the rest of this patchset getting accepted for merging.
Signed-off-by: Rafael Aquini aqu...@redhat.com
---
drivers/virtio/virtio_balloon.c | 1 +
include/linux/vm_event_item.h | 2 ++
mm/compaction.c
501 - 600 of 639 matches
Mail list logo