From: "Jan Beulich" <jbeulich@novell.com>
To: 'Keir Fraser' <keir.fraser@eu.citrix.com>,
Haitao Shan <haitao.shan@intel.com>
Cc: "'xen-devel@lists.xensource.com'" <xen-devel@lists.xensource.com>
Subject: RE: [Question] Why code differs in construct_dom0?
Date: Thu, 20 Nov 2008 13:12:51 +0000 [thread overview]
Message-ID: <49257063.76E4.0078.0@novell.com> (raw)
In-Reply-To: <61563CE63B4F854986A895DA7AD3C17701F7E64D@pdsmsx502.ccr.corp.intel.com>
>>> "Shan, Haitao" <haitao.shan@intel.com> 20.11.08 13:52 >>>
>I think I may not have described the problem clearly. The system has 4G
>memory. From E820 table, there was near 3.5G usable ram below 4G
>and about 0.5G above 4G. Of all the ram, most of the memory was
>allocated to dom0, leaving only those for xen >itself such as xenheap
>and xen's reservations.
>We were using an onboard graphic card. When starting X, agpgart
allocated memory from kernel, then asked xen to exchange these
>pages to contiguous pages below 4G. Each time agpgart module did
>this job, some pages in kernel (which are actually >above 4G in
>physical memory) were replaced with contiguous pages below 4G.
>These kind of demands were rather high, about 256M in our platform.
>Finally, xen's reservation (128M) was not enough to fulfill this
>requirement.
>Why was the reservation exhausted? Because kernel kept asking for
>memory below 4G but only returning to xen memory above 4G. Then
>why is agpgart's allocation always in effect from above 4G? According
>to the code I pasted in my first mail, when pfn in >dom0 was small in
>number, mfn was large. The smaller the pfn was, the larger the
>corresponding mfn was. Apggart allocated memory with GFP_DMA32
>set, so the pfns allocated was likely to be small. Then the mfns were
>likely to be actually quite large (above 4G).
>
>Either increasing the reservation (like 384M) or changing the initial p2m
>mapping in dom0 can solve the problem, and our tests verified this
>judgment. We do not know which solution is better. That's why we are
>seeking your kindly help. I am not sure if I have explained clearly
>enough so far. So any questions on the problem itself, Keir?
Neither of the suggested solutions seems correct to me - both would only
defer the point where the problem occurs. The question really is why
agpgart needs so much memory below 4G. And if that really isn't a bug
somewhere else, then requiring a sufficiently large negative value to
be passed with dom0_mem= would seem to be the only option on this
system (but not as a global default).
Jan
next prev parent reply other threads:[~2008-11-20 13:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 9:07 [Question] Why code differs in construct_dom0? Shan, Haitao
2008-11-20 9:17 ` Keir Fraser
2008-11-20 9:41 ` Shan, Haitao
2008-11-20 9:50 ` Keir Fraser
2008-11-20 10:00 ` Shan, Haitao
2008-11-20 12:52 ` Shan, Haitao
2008-11-20 13:03 ` Keir Fraser
2008-11-20 13:14 ` Shan, Haitao
2008-11-20 13:12 ` Jan Beulich [this message]
2008-11-20 13:34 ` Shan, Haitao
[not found] ` <61563CE63B4F854986A895DA7AD3C17701F100E8@pdsmsx502.ccr.corp.intel.com>
2008-11-20 9:44 ` Shan, Haitao
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=49257063.76E4.0078.0@novell.com \
--to=jbeulich@novell.com \
--cc=haitao.shan@intel.com \
--cc=keir.fraser@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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 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.