All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] memory: arrange to conserve on DMA reservation
@ 2025-02-25 14:58 Jan Beulich
  2025-06-16 13:27 ` Roger Pau Monné
  0 siblings, 1 reply; 10+ messages in thread
From: Jan Beulich @ 2025-02-25 14:58 UTC (permalink / raw)
  To: xen-devel@lists.xenproject.org
  Cc: Andrew Cooper, Julien Grall, Stefano Stabellini, Anthony PERARD,
	Michal Orzel, Roger Pau Monné

Entities building domains are expected to deal with higher order
allocation attempts (for populating a new domain) failing. If we set
aside a reservation for DMA, try to avoid taking higher order pages from
that reserve pool. Instead favor order-0 ones which often can still be
supplied from higher addressed memory, even if we've run out of
large/huge pages there.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
RFC: More generally for any requests targeting remote domains?

--- a/xen/common/memory.c
+++ b/xen/common/memory.c
@@ -192,6 +192,14 @@ static void populate_physmap(struct memo
          * delayed.
          */
         a->memflags |= MEMF_no_icache_flush;
+
+        /*
+         * Heuristically assume that during domain construction the caller is
+         * capable of falling back to order-0 allocations, allowing us to
+         * conserve on memory otherwise held back for DMA purposes.
+         */
+        if ( a->extent_order )
+            a->memflags |= MEMF_no_dma;
     }
 
     for ( i = a->nr_done; i < a->nr_extents; i++ )


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

end of thread, other threads:[~2025-06-18 14:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25 14:58 [PATCH] memory: arrange to conserve on DMA reservation Jan Beulich
2025-06-16 13:27 ` Roger Pau Monné
2025-06-16 14:23   ` Jan Beulich
2025-06-16 14:46     ` Roger Pau Monné
2025-06-16 15:20       ` Jan Beulich
2025-06-16 15:41         ` Roger Pau Monné
2025-06-16 16:02           ` Jan Beulich
2025-06-16 17:23             ` Roger Pau Monné
2025-06-18 12:04               ` Jan Beulich
2025-06-18 14:59                 ` Roger Pau Monné

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.