WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Memory fragmentation and PCI passthrough

To: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Memory fragmentation and PCI passthrough
From: Marek Marczykowski <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 06 Sep 2011 19:54:27 +0200
Cc: Rafal Wojtczuk <rafal@xxxxxxxxxxxxxxxxxxxxxx>, Joanna Rutkowska <joanna@xxxxxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 06 Sep 2011 17:56:55 -0700
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:date:from:mime-version:to:cc :subject:content-type; s=smtpout; bh=6W2nn+SFlnw91Lywxflkg2wKEK4 =; b=UZ6iBLcofeFOBbr+hOu16yFNCpdaB3SERPnpncV6Xd4yZCGcMr6AjHHFaLG zlHt0Onk+XnAzxewJ5tR4xsq5bgrdPd7P/gaVAiK2+QVjMW1J3nn4WcNtHGbgTcH cOhsCzmsajDnbITumK7iizrR2Ino0agU6XPeECOvSv5hB45U=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.11
Hello,

I've hit known problem with dynamic memory management - memory
fragmentation... This dynamic memory management basically does xl
mem-set to balance memory.

After some time of running system, xen memory is so fragmented that it
is impossible to start new VM with PCI device. Sometimes it crashes
during boot (no 64MB contiguous memory for SWIOTLB), or later - eg.
iwlagn cannot allocate memory for loading firmware (few allocs, each
bellow 100k).

DomU kernel cmdline: console=hvc0 iommu=soft earlyprintk=xen

There is two cases (I think):
1. With IOMMU
2. Without IOMMU
I've tried only the second one.

Is there any known solution for this problem?
Some ideas:
1. With IOMMU pass iommu=pv to Xen. AFAIU domU will not need iommu=soft
parameter then, right? Will it work then with fragmented memory?

2. Force somehow on xen/libxl to allocate memory (for domU) in chunks
of, say 4MB, to not fragment it so badly. Is it doable?

In tmem documentation is also described some workaround for this:
reserve some memory region for allocations with 0<order<=9. But SWIOTLB
tries to allocate 64MB, which much bigger than 2MB... Is it really
needed to allocate such big region of contiguous memory in one piece?

-- 
Pozdrawiam / Best Regards,
Marek Marczykowski
Invisible Things Lab

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>