From: David Hildenbrand <david@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: David Hildenbrand <david@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Jason Wang <jasowang@redhat.com>,
Marek Kedzierski <mkedzier@redhat.com>,
Hui Zhu <teawater@gmail.com>,
Pankaj Gupta <pankaj.gupta.linux@gmail.com>,
Wei Yang <richard.weiyang@linux.alibaba.com>,
Oscar Salvador <osalvador@suse.de>,
Michal Hocko <mhocko@kernel.org>,
virtualization@lists.linux-foundation.org, linux-mm@kvack.org
Subject: [PATCH v1 0/7] virtio-mem: prioritize unplug from ZONE_MOVABLE
Date: Wed, 2 Jun 2021 20:57:13 +0200 [thread overview]
Message-ID: <20210602185720.31821-1-david@redhat.com> (raw)
Until now, memory provided by a single virtio-mem device was usually
either onlined completely to ZONE_MOVABLE (online_movable) or to
ZONE_NORMAL (online_kernel), so we didn't actually care about "what"
we are unplugging; however, that will change in the future when we will
have memory blocks in different zones within a single virtio-mem device.
There are two reasons why we want to track to which zone a memory block
belongs to and prioritize ZONE_MOVABLE blocks:
1) Memory managed by ZONE_MOVABLE can more likely get unplugged, therefore,
resulting in a faster memory hotunplug process. Further, we can more
reliably unplug and remove complete memory blocks, removing metadata
allocated for the whole memory block.
2) We want to avoid corner cases where unplugging with the current scheme
(highest to lowest address) could result in accidential zone imbalances,
whereby we remove too much ZONE_NORMAL memory for ZONE_MOVABLE memory
of the same device.
This series unplugs ZONE_MOVABLE memory blocks first, before falling back
to ZONE_NORMAL ones.
Patch #1 is an unrelated fix, previously sent in other context that didn't
get picked up yet. Patch #2-#4 and #6 are cleanups. Patch #5 and #7
implement ZONE_MOVABLE aware handling in Sub Block Mode and Big Block Mode
respectively.
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>
Cc: Marek Kedzierski <mkedzier@redhat.com>
Cc: Hui Zhu <teawater@gmail.com>
Cc: Pankaj Gupta <pankaj.gupta.linux@gmail.com>
Cc: Wei Yang <richard.weiyang@linux.alibaba.com>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: virtualization@lists.linux-foundation.org
Cc: linux-mm@kvack.org
David Hildenbrand (7):
virtio-mem: don't read big block size in Sub Block Mode
virtio-mem: use page_zonenum() in virtio_mem_fake_offline()
virtio-mem: simplify high-level plug handling in Sub Block Mode
virtio-mem: simplify high-level unplug handling in Sub Block Mode
virtio-mem: prioritize unplug from ZONE_MOVABLE in Sub Block Mode
virtio-mem: simplify high-level unplug handling in Big Block Mode
virtio-mem: prioritize unplug from ZONE_MOVABLE in Big Block Mode
drivers/virtio/virtio_mem.c | 338 +++++++++++++++++++-----------------
1 file changed, 174 insertions(+), 164 deletions(-)
base-commit: 8124c8a6b35386f73523d27eacb71b5364a68c4c
--
2.31.1
next reply other threads:[~2021-06-02 18:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 18:57 David Hildenbrand [this message]
2021-06-02 18:57 ` [PATCH v1 1/7] virtio-mem: don't read big block size in Sub Block Mode David Hildenbrand
2021-06-02 18:57 ` [PATCH v1 2/7] virtio-mem: use page_zonenum() in virtio_mem_fake_offline() David Hildenbrand
2021-06-02 18:57 ` [PATCH v1 3/7] virtio-mem: simplify high-level plug handling in Sub Block Mode David Hildenbrand
2021-06-02 18:57 ` [PATCH v1 4/7] virtio-mem: simplify high-level unplug " David Hildenbrand
2021-06-02 18:57 ` [PATCH v1 5/7] virtio-mem: prioritize unplug from ZONE_MOVABLE " David Hildenbrand
2021-06-02 18:57 ` [PATCH v1 6/7] virtio-mem: simplify high-level unplug handling in Big " David Hildenbrand
2021-06-02 18:57 ` [PATCH v1 7/7] virtio-mem: prioritize unplug from ZONE_MOVABLE " David Hildenbrand
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=20210602185720.31821-1-david@redhat.com \
--to=david@redhat.com \
--cc=jasowang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mkedzier@redhat.com \
--cc=mst@redhat.com \
--cc=osalvador@suse.de \
--cc=pankaj.gupta.linux@gmail.com \
--cc=richard.weiyang@linux.alibaba.com \
--cc=teawater@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 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).