All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] make balloon pages movable by compaction
@ 2012-07-17 16:50 ` Rafael Aquini
  0 siblings, 0 replies; 62+ messages in thread
From: Rafael Aquini @ 2012-07-17 16:50 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, virtualization, Rusty Russell, Michael S. Tsirkin,
	Rik van Riel, Mel Gorman, Andi Kleen, Andrew Morton,
	Konrad Rzeszutek Wilk, Minchan Kim, Rafael Aquini, 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-set follows the main idea discussed at 2012 LSFMMS session:
"Ballooning for transparent huge pages" -- http://lwn.net/Articles/490114/
to introduce the required changes to the virtio_balloon driver, as well as
the changes to the core compaction & migration bits, in order to make those
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 balloon pages
  mm: add vm event counters for balloon pages compaction

 drivers/virtio/virtio_balloon.c |  146 ++++++++++++++++++++++++++++++++++++---
 include/linux/mm.h              |   15 ++++
 include/linux/virtio_balloon.h  |    4 ++
 include/linux/vm_event_item.h   |    2 +
 mm/compaction.c                 |  127 +++++++++++++++++++++++++++++-----
 mm/migrate.c                    |   32 ++++++++-
 mm/vmstat.c                     |    4 ++
 7 files changed, 302 insertions(+), 28 deletions(-)

Change log:
v4: 
 * address Rusty Russel's review comments on PATCH 02;
 * re-base virtio_balloon patch on 9c378abc5c0c6fc8e3acf5968924d274503819b3;
V3: 
 * address reviewers nitpick suggestions on PATCH 01 (Mel, Minchan);
V2: 
 * address Mel Gorman's review comments on PATCH 01;


Preliminary test results:
(2 VCPU 1024mB RAM KVM guest running 3.5.0_rc7+ -- after a reboot)
* 64mB balloon:
[root@localhost ~]# awk '/compact/ {print}' /proc/vmstat
compact_blocks_moved 0
compact_pages_moved 0
compact_pagemigrate_failed 0
compact_stall 0
compact_fail 0
compact_success 0
compact_balloon_migrated 0
compact_balloon_failed 0
compact_balloon_isolated 0
compact_balloon_freed 0
[root@localhost ~]#
[root@localhost ~]# for i in $(seq 1 4); do echo 1 > /proc/sys/vm/compact_memory & done &>/dev/null
[1]   Done                    echo 1 > /proc/sys/vm/compact_memory
[2]   Done                    echo 1 > /proc/sys/vm/compact_memory
[3]-  Done                    echo 1 > /proc/sys/vm/compact_memory
[4]+  Done                    echo 1 > /proc/sys/vm/compact_memory
[root@localhost ~]#
[root@localhost ~]# awk '/compact/ {print}' /proc/vmstat
compact_blocks_moved 2842
compact_pages_moved 48429
compact_pagemigrate_failed 81
compact_stall 0
compact_fail 0
compact_success 0
compact_balloon_migrated 16364
compact_balloon_failed 0
compact_balloon_isolated 16364
compact_balloon_freed 16364


* 128mB balloon:
[root@localhost ~]# awk '/compact/ {print}' /proc/vmstat
compact_blocks_moved 0
compact_pages_moved 0
compact_pagemigrate_failed 0
compact_stall 0
compact_fail 0
compact_success 0
compact_balloon_migrated 0
compact_balloon_failed 0
compact_balloon_isolated 0
compact_balloon_freed 0
[root@localhost ~]#
[root@localhost ~]# for i in $(seq 1 4); do echo 1 > /proc/sys/vm/compact_memory & done &>/dev/null
[1]   Done                    echo 1 > /proc/sys/vm/compact_memory
[2]   Done                    echo 1 > /proc/sys/vm/compact_memory
[3]-  Done                    echo 1 > /proc/sys/vm/compact_memory
[4]+  Done                    echo 1 > /proc/sys/vm/compact_memory
[root@localhost ~]#
[root@localhost ~]# awk '/compact/ {print}' /proc/vmstat
compact_blocks_moved 2162
compact_pages_moved 33735
compact_pagemigrate_failed 69
compact_stall 0
compact_fail 0
compact_success 0
compact_balloon_migrated 21731
compact_balloon_failed 0
compact_balloon_isolated 21731
compact_balloon_freed 21731

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2012-08-03 12:27 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 16:50 [PATCH v4 0/3] make balloon pages movable by compaction Rafael Aquini
2012-07-17 16:50 ` Rafael Aquini
2012-07-17 16:50 ` [PATCH v4 1/3] mm: introduce compaction and migration for virtio ballooned pages Rafael Aquini
2012-07-17 16:50 ` Rafael Aquini
2012-07-17 16:50   ` Rafael Aquini
2012-07-18  5:48   ` Minchan Kim
2012-07-18  5:48   ` Minchan Kim
2012-07-18  5:48     ` Minchan Kim
2012-07-20 19:48     ` Rafael Aquini
2012-07-20 19:48       ` Rafael Aquini
2012-07-20 19:48       ` Rafael Aquini
2012-07-23  2:33       ` Minchan Kim
2012-07-23  2:33       ` Minchan Kim
2012-07-23  2:33         ` Minchan Kim
2012-07-23  2:35         ` Minchan Kim
2012-07-23  2:35         ` Minchan Kim
2012-07-23  2:35           ` Minchan Kim
2012-07-23 18:19         ` Rafael Aquini
2012-07-23 18:19           ` Rafael Aquini
2012-07-23 18:19           ` Rafael Aquini
2012-08-01 20:53           ` Rik van Riel
2012-08-01 20:53             ` Rik van Riel
2012-08-03 11:13             ` Rafael Aquini
2012-08-03 11:13               ` Rafael Aquini
2012-08-03 11:13               ` Rafael Aquini
2012-08-01 20:53           ` Rik van Riel
2012-08-01 20:51         ` Rik van Riel
2012-08-01 20:51         ` Rik van Riel
2012-08-01 20:51           ` Rik van Riel
2012-08-03 12:26         ` Rafael Aquini
2012-08-03 12:26           ` Rafael Aquini
2012-08-03 12:26         ` Rafael Aquini
2012-07-18 22:46   ` Andrew Morton
2012-07-18 22:46     ` Andrew Morton
2012-07-18 22:46     ` Andrew Morton
2012-07-18 23:07     ` Rafael Aquini
2012-07-18 23:07     ` Rafael Aquini
2012-07-18 23:07       ` Rafael Aquini
2012-07-18 23:12       ` Andrew Morton
2012-07-18 23:12         ` Andrew Morton
2012-07-18 23:12         ` Andrew Morton
2012-07-19  1:00         ` Rafael Aquini
2012-07-19  1:00         ` Rafael Aquini
2012-07-19  1:00           ` Rafael Aquini
2012-07-19  1:29           ` Andrew Morton
2012-07-19  1:29           ` Andrew Morton
2012-07-19  1:29             ` Andrew Morton
2012-07-19 12:32             ` Rafael Aquini
2012-07-19 12:32               ` Rafael Aquini
2012-07-19 12:32               ` Rafael Aquini
2012-07-17 16:50 ` [PATCH v4 2/3] virtio_balloon: introduce migration primitives to balloon pages Rafael Aquini
2012-07-17 16:50   ` Rafael Aquini
2012-07-18 22:49   ` Andrew Morton
2012-07-18 22:49     ` Andrew Morton
2012-07-18 22:49     ` Andrew Morton
2012-07-18 23:16     ` Rafael Aquini
2012-07-18 23:16     ` Rafael Aquini
2012-07-18 23:16       ` Rafael Aquini
2012-07-17 16:50 ` Rafael Aquini
2012-07-17 16:50 ` [PATCH v4 3/3] mm: add vm event counters for balloon pages compaction Rafael Aquini
2012-07-17 16:50 ` Rafael Aquini
2012-07-17 16:50   ` Rafael Aquini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.