linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/7] virtio-mem: prioritize unplug from ZONE_MOVABLE
@ 2021-06-02 18:57 David Hildenbrand
  2021-06-02 18:57 ` [PATCH v1 1/7] virtio-mem: don't read big block size in Sub Block Mode David Hildenbrand
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: David Hildenbrand @ 2021-06-02 18:57 UTC (permalink / raw)
  To: linux-kernel
  Cc: David Hildenbrand, Michael S. Tsirkin, Jason Wang,
	Marek Kedzierski, Hui Zhu, Pankaj Gupta, Wei Yang, Oscar Salvador,
	Michal Hocko, virtualization, linux-mm

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



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

end of thread, other threads:[~2021-06-02 18:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-02 18:57 [PATCH v1 0/7] virtio-mem: prioritize unplug from ZONE_MOVABLE David Hildenbrand
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

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).