public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: "Jeremy Fitzhardinge" <jeremy@goop.org>
Cc: "Jeremy Fitzhardinge" <jeremy.fitzhardinge@citrix.com>,
	"the arch/x86 maintainers" <x86@kernel.org>,
	"David Airlie" <airlied@linux.ie>,
	"Xen-devel" <xen-devel@lists.xensource.com>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [Xen-devel] [PATCH 10/27] xen: make sure swiotlb	 allocationisphysically contigious
Date: Tue, 17 Mar 2009 07:50:05 +0000	[thread overview]
Message-ID: <49BF643D.76E4.0078.0@novell.com> (raw)
In-Reply-To: <49BEAA61.4020208@goop.org>

>>> Jeremy Fitzhardinge <jeremy@goop.org> 16.03.09 20:37 >>>
>Jan Beulich wrote:
>>  
>> While on native using alloc_bootmem_low_pages() is a requirement here,
>> on Xen this should explicitly not be used, as we realized just a couple of
>> days ago:
>
>Which conversation was this?

I pointed out the issue in a mail titled "alloc_bootmem_low() mis-uses", in
response to a bug report we had from HP running into an out-of-memory
panic from the bootmem allocator when allocating the 64Mb of swiotlb on
a 256Gb box.

>>  The way the bootmem allocator works, running out of space
>> below 4Gb is pretty easy on machines with lots of memory, and since the
>> swiotlb is a requirement for Dom0, the risk of allocation failures must be
>> kept as low as possible.
>>   
>
>Are we talking about a 32 or 64 bit dom0 here?  If its 32-bit, then yes, 
>low memory is a precious resource, but I don't see why that depends on 
>the total amount of memory.  And if its 64-bit, why is below-4G 
>particularly constrained?  That would only matter for 32-bit devices?

No, it's in particular about 64-bit (and native has a similar potential problem
here, just that it's not that easily fixable because, as said,
alloc_bootmem_low_pages() is a must there): Since the bootmem allocator
(generally) works from bottom to top, 'normal' (i.e. without the _low suffix)
bootmem allocations may eat up most/all memory below 4Gb, and when
finally the swiotlb initialization runs there's no memory left for it.

For boxes with yet much more memory (as I realized only after having
written that other mail), there's also another issue of the bootmem
allocation bitmap generally getting allocated as low as possible (which
again may eat up all memory below 4Gb), but fixing this at least doesn't
require touching the bootmem code itself (and is of course a really
secondary issue, as it's going to be a couple of years until this bitmap
would reach into the Gb range).

Jan


  reply	other threads:[~2009-03-17  7:49 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-13 16:59 [GIT PULL] Xen dom0 hardware access support Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 01/27] xen: Don't disable the I/O space Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 02/27] xen: Allow unprivileged Xen domains to create iomap pages Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 03/27] Xen: Rename the balloon lock Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 04/27] xen: Add xen_create_contiguous_region Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 05/27] x86/PCI: Clean up pci_cache_line_size Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 06/27] x86/PCI: Enable scanning of all pci functions Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 07/27] Xen/x86/PCI: Add support for the Xen PCI subsytem Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 08/27] x86/pci: make sure _PAGE_IOMAP it set on pci mappings Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 09/27] xen/pci: clean up Kconfig a bit Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 10/27] xen: make sure swiotlb allocation is physically contigious Jeremy Fitzhardinge
2009-03-16 13:30   ` [Xen-devel] [PATCH 10/27] xen: make sure swiotlb allocation isphysically contigious Jan Beulich
2009-03-16 19:37     ` Jeremy Fitzhardinge
2009-03-17  7:50       ` Jan Beulich [this message]
2009-03-13 16:59 ` [PATCH 11/27] xen swiotlb: fixup swiotlb is chunks smaller than MAX_CONTIG_ORDER Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 12/27] xen: add hooks for mapping phys<->bus addresses in swiotlb Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 13/27] xen/swiotlb: add hook for swiotlb_arch_range_needs_mapping Jeremy Fitzhardinge
2009-03-13 16:59 ` [PATCH 14/27] xen: enable swiotlb for xen domain 0 Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 15/27] xen/swiotlb: use dma_alloc_from_coherent to get device coherent memory Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 16/27] swiotlb: use swiotlb_alloc_boot to allocate emergency pool Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 17/27] xen/swiotlb: improve comment on gfp flags in xen_alloc_coherent() Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 18/27] xen/swiotlb: add sync functions Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 19/27] xen: set callout_map to make mtrr work Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 20/27] xen mtrr: Use specific cpu_has_foo macros instead of generic cpu_has() Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 21/27] xen mtrr: Use generic_validate_add_page() Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 22/27] xen mtrr: Implement xen_get_free_region() Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 23/27] xen mtrr: Add xen_{get,set}_mtrr() implementations Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 24/27] xen mtrr: Kill some unneccessary includes Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 25/27] x86: define arch_vm_get_page_prot to set _PAGE_IOMAP on VM_IO vmas Jeremy Fitzhardinge
2009-03-13 17:00 ` [PATCH 26/27] agp: use more dma-ops-like operations for agp memory Jeremy Fitzhardinge
2009-03-30 21:13   ` Dave Airlie
2009-03-13 17:00 ` [PATCH 27/27] agp/intel: use dma_alloc_coherent for special cursor memory Jeremy Fitzhardinge
2009-03-30 21:12   ` Dave Airlie

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=49BF643D.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=airlied@linux.ie \
    --cc=hpa@zytor.com \
    --cc=jeremy.fitzhardinge@citrix.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=x86@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox