[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210602185720.31821-1-david@redhat.com>
Date: Wed, 2 Jun 2021 20:57:13 +0200
From: David Hildenbrand <david@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: David Hildenbrand <david@...hat.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
Marek Kedzierski <mkedzier@...hat.com>,
Hui Zhu <teawater@...il.com>,
Pankaj Gupta <pankaj.gupta.linux@...il.com>,
Wei Yang <richard.weiyang@...ux.alibaba.com>,
Oscar Salvador <osalvador@...e.de>,
Michal Hocko <mhocko@...nel.org>,
virtualization@...ts.linux-foundation.org, linux-mm@...ck.org
Subject: [PATCH v1 0/7] virtio-mem: prioritize unplug from ZONE_MOVABLE
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@...hat.com>
Cc: Jason Wang <jasowang@...hat.com>
Cc: Marek Kedzierski <mkedzier@...hat.com>
Cc: Hui Zhu <teawater@...il.com>
Cc: Pankaj Gupta <pankaj.gupta.linux@...il.com>
Cc: Wei Yang <richard.weiyang@...ux.alibaba.com>
Cc: Oscar Salvador <osalvador@...e.de>
Cc: Michal Hocko <mhocko@...nel.org>
Cc: virtualization@...ts.linux-foundation.org
Cc: linux-mm@...ck.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
Powered by blists - more mailing lists