All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Soichiro Ueda <the.latticeheart@gmail.com>,
	mst@redhat.com, jasowang@redhat.com, akpm@linux-foundation.org
Cc: virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	kalutes@google.com, mhiramat@kernel.org, cwd@google.com
Subject: Re: [PATCH] virtio_balloon: high order allocation
Date: Fri, 23 Dec 2022 10:40:17 +0100	[thread overview]
Message-ID: <c8ea7076-f107-c340-6b34-6b22a9369da5@redhat.com> (raw)
In-Reply-To: <20221223093527.12424-1-the.latticeheart@gmail.com>

On 23.12.22 10:35, Soichiro Ueda wrote:
> At present, the VirtIO balloon device driver allocates pages
> one by one using alloc_page(), and frees them using put_page().
> 
> This changes it so that the driver allocates high order pages
> by using alloc_pages(), and frees them using __free_pages() if possible.
> By doing so, the CPU performance of inflation and deflation
> should be improved.
> 
> The effect of this change has been confirmed by benchmarks that measure
> the elapsed time of inflation and deflation.
> 
> The results are here:
> 
> 16 pages inflation:
>    before: 119,779 ns
>    after : 115,655 ns (-3.4%)
> 64 pages inflation:
>    before: 156,977 ns
>    after : 150,961 ns (-3.8%)
> 256 pages inflation:
>    before: 218,649 ns
>    after : 208,490 ns (-4.6%)
> 16 pages deflation:
>    before: 78,112 ns
>    after : 68,288 ns (-12.6%)
> 64 pages deflation:
>    before: 97,205 ns
>    after : 80,491 ns (-17.194%)
> 256 pages deflation:
>    before: 122,742 ns
>    after : 107,526 ns (-12.4%)

How does this affect page migration / balloon compaction etc?

-- 
Thanks,

David / dhildenb


WARNING: multiple messages have this Message-ID (diff)
From: David Hildenbrand <david@redhat.com>
To: Soichiro Ueda <the.latticeheart@gmail.com>,
	mst@redhat.com, jasowang@redhat.com, akpm@linux-foundation.org
Cc: cwd@google.com, linux-kernel@vger.kernel.org, kalutes@google.com,
	linux-mm@kvack.org, mhiramat@kernel.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH] virtio_balloon: high order allocation
Date: Fri, 23 Dec 2022 10:40:17 +0100	[thread overview]
Message-ID: <c8ea7076-f107-c340-6b34-6b22a9369da5@redhat.com> (raw)
In-Reply-To: <20221223093527.12424-1-the.latticeheart@gmail.com>

On 23.12.22 10:35, Soichiro Ueda wrote:
> At present, the VirtIO balloon device driver allocates pages
> one by one using alloc_page(), and frees them using put_page().
> 
> This changes it so that the driver allocates high order pages
> by using alloc_pages(), and frees them using __free_pages() if possible.
> By doing so, the CPU performance of inflation and deflation
> should be improved.
> 
> The effect of this change has been confirmed by benchmarks that measure
> the elapsed time of inflation and deflation.
> 
> The results are here:
> 
> 16 pages inflation:
>    before: 119,779 ns
>    after : 115,655 ns (-3.4%)
> 64 pages inflation:
>    before: 156,977 ns
>    after : 150,961 ns (-3.8%)
> 256 pages inflation:
>    before: 218,649 ns
>    after : 208,490 ns (-4.6%)
> 16 pages deflation:
>    before: 78,112 ns
>    after : 68,288 ns (-12.6%)
> 64 pages deflation:
>    before: 97,205 ns
>    after : 80,491 ns (-17.194%)
> 256 pages deflation:
>    before: 122,742 ns
>    after : 107,526 ns (-12.4%)

How does this affect page migration / balloon compaction etc?

-- 
Thanks,

David / dhildenb

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  reply	other threads:[~2022-12-23  9:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-23  9:35 [PATCH] virtio_balloon: high order allocation Soichiro Ueda
2022-12-23  9:40 ` David Hildenbrand [this message]
2022-12-23  9:40   ` David Hildenbrand
2022-12-29  5:31   ` Soichiro Ueda
2023-01-02 11:55     ` David Hildenbrand
2023-01-02 11:55       ` David Hildenbrand
2022-12-24  3:26 ` Liu Shixin
2022-12-29  6:27   ` Soichiro Ueda
2022-12-23 21:04 kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8ea7076-f107-c340-6b34-6b22a9369da5@redhat.com \
    --to=david@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cwd@google.com \
    --cc=jasowang@redhat.com \
    --cc=kalutes@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhiramat@kernel.org \
    --cc=mst@redhat.com \
    --cc=the.latticeheart@gmail.com \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.