From: Mukesh Rathor Subject: dom0 boot failure: dma_reserve in reserve_bootmem_generic() Date: Fri, 25 Jun 2010 18:40:46 -0700 Message-ID: <20100625184046.73890d00@mantra.us.oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Hi, I've been debugging an interesting dom0 boot failure which happens only on certain machines when dom0_mem=830M. A scsi driver fails to allocate 512 bytes in GFP_DMA. However, the system boots with 500M or 930M. The root cause: reserve_bootmem_generic(): .... if (phys+len <= MAX_DMA_PFN*PAGE_SIZE) dma_reserve += len / PAGE_SIZE; <--- In case of 830M, phys+len is just enough to set dma_reserve where the dma memory zone is then 'holed' out. With less dom0_mem, it leaves few pages for GFP_DMA. With more, phys+len is larger than MAX_DMA_PFN*PAGE_SIZE and it skips setting dma_reserve so DMA cache is good again. So, anyone know the point of setting dma_reserve? Obviously, things are implied OK without it, so would it be safe to just remove the if stmt completely? thanks a lot, Mukesh