* [PATCH v2 0/4] make balloon pages movable by compaction
@ 2012-06-28 21:49 Rafael Aquini
0 siblings, 0 replies; 5+ messages in thread
From: Rafael Aquini @ 2012-06-28 21:49 UTC (permalink / raw)
To: linux-mm
Cc: Rik van Riel, Rafael Aquini, Konrad Rzeszutek Wilk,
Michael S. Tsirkin, linux-kernel, virtualization, Andi Kleen,
Andrew Morton
This patchset follows the main idea discussed at 2012 LSFMMS section:
"Ballooning for transparent huge pages" -- http://lwn.net/Articles/490114/
to introduce the required changes to the virtio_balloon driver, as well as
changes to the core compaction & migration bits, in order to allow
memory balloon pages become movable within a guest.
Rafael Aquini (4):
mm: introduce compaction and migration for virtio ballooned pages
virtio_balloon: handle concurrent accesses to virtio_balloon struct
elements
virtio_balloon: introduce migration primitives to balloon pages
mm: add vm event counters for balloon pages compaction
drivers/virtio/virtio_balloon.c | 142 +++++++++++++++++++++++++++++++++++----
include/linux/mm.h | 16 +++++
include/linux/virtio_balloon.h | 6 ++
include/linux/vm_event_item.h | 2 +
mm/compaction.c | 111 ++++++++++++++++++++++++------
mm/migrate.c | 32 ++++++++-
mm/vmstat.c | 4 ++
7 files changed, 280 insertions(+), 33 deletions(-)
V2: address Mel Gorman's review comments
TODO:
- check on naming chages suggested by Konrad (original series discussion)
Preliminary test results:
(2 VCPU 1024mB RAM KVM guest running 3.5.0_rc4+)
* 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 > /proc/sys/vm/compact_memory
[2] Done echo > /proc/sys/vm/compact_memory
[3]- Done echo > /proc/sys/vm/compact_memory
[4]+ Done echo > /proc/sys/vm/compact_memory
[root@localhost ~]#
[root@localhost ~]# awk '/compact/ {print}' /proc/vmstat
compact_blocks_moved 2717
compact_pages_moved 46697
compact_pagemigrate_failed 75
compact_stall 0
compact_fail 0
compact_success 0
compact_balloon_migrated 16384
compact_balloon_failed 0
compact_balloon_isolated 16384
compact_balloon_freed 16384
* 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 > /proc/sys/vm/compact_memory
[2] Done echo > /proc/sys/vm/compact_memory
[3]- Done echo > /proc/sys/vm/compact_memory
[4]+ Done echo > /proc/sys/vm/compact_memory
[root@localhost ~]#
[root@localhost ~]# awk '/compact/ {print}' /proc/vmstat
compact_blocks_moved 2598
compact_pages_moved 47660
compact_pagemigrate_failed 103
compact_stall 0
compact_fail 0
compact_success 0
compact_balloon_migrated 26652
compact_balloon_failed 76
compact_balloon_isolated 26728
compact_balloon_freed 26652
--
1.7.10.2
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <cover.1340916058.git.aquini@redhat.com>]
* Re: [PATCH v2 0/4] make balloon pages movable by compaction
[not found] <cover.1340916058.git.aquini@redhat.com>
@ 2012-06-29 1:37 ` Minchan Kim
[not found] ` <4FED06C8.1090003@kernel.org>
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Minchan Kim @ 2012-06-29 1:37 UTC (permalink / raw)
To: Rafael Aquini
Cc: Rik van Riel, Konrad Rzeszutek Wilk, Michael S. Tsirkin,
linux-kernel, virtualization, linux-mm, Andi Kleen, Andrew Morton
Hi Rafael,
On 06/29/2012 06:49 AM, Rafael Aquini wrote:
> This patchset follows the main idea discussed at 2012 LSFMMS section:
> "Ballooning for transparent huge pages" -- http://lwn.net/Articles/490114/
Could you summarize the problem, solution instead of link URL in cover-letter?
IIUC, the problem is that it is hard to get contiguous memory in guest-side
after ballooning happens because guest-side memory could be very fragmented
by ballooned page. It makes THP page allocation of guest-side very poor success ratio.
The solution is that when memory ballooning happens, we allocates ballooned page
as a movable page in guest-side because they can be migrated easily so compaction of
guest-side could put together them into either side so that we can get contiguous memory.
For it, compaction should be aware of ballooned page.
Right?
--
Kind regards,
Minchan Kim
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <4FED06C8.1090003@kernel.org>]
* Re: [PATCH v2 0/4] make balloon pages movable by compaction
[not found] ` <4FED06C8.1090003@kernel.org>
@ 2012-06-29 3:51 ` Rafael Aquini
0 siblings, 0 replies; 5+ messages in thread
From: Rafael Aquini @ 2012-06-29 3:51 UTC (permalink / raw)
To: Minchan Kim
Cc: Rik van Riel, Konrad Rzeszutek Wilk, Michael S. Tsirkin,
linux-kernel, virtualization, linux-mm, Andi Kleen, Andrew Morton
On Fri, Jun 29, 2012 at 10:37:12AM +0900, Minchan Kim wrote:
> Hi Rafael,
>
> On 06/29/2012 06:49 AM, Rafael Aquini wrote:
>
> > This patchset follows the main idea discussed at 2012 LSFMMS section:
> > "Ballooning for transparent huge pages" -- http://lwn.net/Articles/490114/
>
>
> Could you summarize the problem, solution instead of link URL in cover-letter?
> IIUC, the problem is that it is hard to get contiguous memory in guest-side
> after ballooning happens because guest-side memory could be very fragmented
> by ballooned page. It makes THP page allocation of guest-side very poor success ratio.
>
> The solution is that when memory ballooning happens, we allocates ballooned page
> as a movable page in guest-side because they can be migrated easily so compaction of
> guest-side could put together them into either side so that we can get contiguous memory.
> For it, compaction should be aware of ballooned page.
>
> Right?
>
Yes, you surely got it correct, sir.
Thanks Minchan, for taking time to provide me such feedback. I'll rework commit
messages to make them more elucidative, yet concise for the next submission.
Please, let me know if you have other concerns I shall be addressing here.
Best regards!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/4] make balloon pages movable by compaction
[not found] <cover.1340916058.git.aquini@redhat.com>
2012-06-29 1:37 ` Minchan Kim
[not found] ` <4FED06C8.1090003@kernel.org>
@ 2012-06-29 4:31 ` Rusty Russell
[not found] ` <87r4syzqkn.fsf@rustcorp.com.au>
3 siblings, 0 replies; 5+ messages in thread
From: Rusty Russell @ 2012-06-29 4:31 UTC (permalink / raw)
To: linux-mm
Cc: Rik van Riel, Rafael Aquini, Michael S. Tsirkin,
Konrad Rzeszutek Wilk, linux-kernel, virtualization, Andi Kleen,
Andrew Morton
On Thu, 28 Jun 2012 18:49:38 -0300, Rafael Aquini <aquini@redhat.com> wrote:
> This patchset follows the main idea discussed at 2012 LSFMMS section:
> "Ballooning for transparent huge pages" -- http://lwn.net/Articles/490114/
>
> to introduce the required changes to the virtio_balloon driver, as well as
> changes to the core compaction & migration bits, in order to allow
> memory balloon pages become movable within a guest.
>
> Rafael Aquini (4):
> mm: introduce compaction and migration for virtio ballooned pages
> virtio_balloon: handle concurrent accesses to virtio_balloon struct
> elements
> virtio_balloon: introduce migration primitives to balloon pages
> mm: add vm event counters for balloon pages compaction
>
> drivers/virtio/virtio_balloon.c | 142 +++++++++++++++++++++++++++++++++++----
> include/linux/mm.h | 16 +++++
> include/linux/virtio_balloon.h | 6 ++
> include/linux/vm_event_item.h | 2 +
> mm/compaction.c | 111 ++++++++++++++++++++++++------
> mm/migrate.c | 32 ++++++++-
> mm/vmstat.c | 4 ++
> 7 files changed, 280 insertions(+), 33 deletions(-)
>
>
> V2: address Mel Gorman's review comments
If Mel is happy, I am happy. Seems sensible that the virtio_baloon
changes go in at the same time as the mm changes, so:
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Cheers,
Rusty.
^ permalink raw reply [flat|nested] 5+ messages in thread[parent not found: <87r4syzqkn.fsf@rustcorp.com.au>]
* Re: [PATCH v2 0/4] make balloon pages movable by compaction
[not found] ` <87r4syzqkn.fsf@rustcorp.com.au>
@ 2012-06-29 17:46 ` Rafael Aquini
0 siblings, 0 replies; 5+ messages in thread
From: Rafael Aquini @ 2012-06-29 17:46 UTC (permalink / raw)
To: Rusty Russell
Cc: Rik van Riel, Michael S. Tsirkin, Konrad Rzeszutek Wilk,
linux-kernel, virtualization, linux-mm, Andi Kleen, Andrew Morton
On Fri, Jun 29, 2012 at 02:01:52PM +0930, Rusty Russell wrote:
> On Thu, 28 Jun 2012 18:49:38 -0300, Rafael Aquini <aquini@redhat.com> wrote:
> > This patchset follows the main idea discussed at 2012 LSFMMS section:
> > "Ballooning for transparent huge pages" -- http://lwn.net/Articles/490114/
> >
> > to introduce the required changes to the virtio_balloon driver, as well as
> > changes to the core compaction & migration bits, in order to allow
> > memory balloon pages become movable within a guest.
> >
> > Rafael Aquini (4):
> > mm: introduce compaction and migration for virtio ballooned pages
> > virtio_balloon: handle concurrent accesses to virtio_balloon struct
> > elements
> > virtio_balloon: introduce migration primitives to balloon pages
> > mm: add vm event counters for balloon pages compaction
> >
> > drivers/virtio/virtio_balloon.c | 142 +++++++++++++++++++++++++++++++++++----
> > include/linux/mm.h | 16 +++++
> > include/linux/virtio_balloon.h | 6 ++
> > include/linux/vm_event_item.h | 2 +
> > mm/compaction.c | 111 ++++++++++++++++++++++++------
> > mm/migrate.c | 32 ++++++++-
> > mm/vmstat.c | 4 ++
> > 7 files changed, 280 insertions(+), 33 deletions(-)
> >
> >
> > V2: address Mel Gorman's review comments
>
> If Mel is happy, I am happy. Seems sensible that the virtio_baloon
> changes go in at the same time as the mm changes, so:
>
> Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Thanks Rusty!
I'll be respinning a v3 to address some extra suggestions Mel did, so if you
have any concern that you'd like me to address, do not hesitate on letting me
know!
Cheers!
Rafael
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-29 17:46 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-28 21:49 [PATCH v2 0/4] make balloon pages movable by compaction Rafael Aquini
[not found] <cover.1340916058.git.aquini@redhat.com>
2012-06-29 1:37 ` Minchan Kim
[not found] ` <4FED06C8.1090003@kernel.org>
2012-06-29 3:51 ` Rafael Aquini
2012-06-29 4:31 ` Rusty Russell
[not found] ` <87r4syzqkn.fsf@rustcorp.com.au>
2012-06-29 17:46 ` Rafael Aquini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).