From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755091Ab3AKQgf (ORCPT ); Fri, 11 Jan 2013 11:36:35 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:46132 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754578Ab3AKQge (ORCPT ); Fri, 11 Jan 2013 11:36:34 -0500 Date: Fri, 11 Jan 2013 11:35:48 -0500 From: Konrad Rzeszutek Wilk To: Yinghai Lu Cc: "Eric W. Biederman" , Shuah Khan , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andrew Morton , Borislav Petkov , Jan Kiszka , Jason Wessel , linux-kernel@vger.kernel.org, Joerg Roedel Subject: Re: [PATCH v7u1 26/31] x86: Don't enable swiotlb if there is not enough ram for it Message-ID: <20130111163548.GB25620@phenom.dumpdata.com> References: <20130109004340.GA12234@konrad-lan.dumpdata.com> <87txqruq8p.fsf@xmission.com> <20130109132409.GB18395@phenom.dumpdata.com> <87d2xeul5v.fsf@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 10, 2013 at 03:07:10PM -0800, Yinghai Lu wrote: > On Wed, Jan 9, 2013 at 1:15 PM, Yinghai Lu wrote: > > On Wed, Jan 9, 2013 at 1:00 PM, Eric W. Biederman wrote: > >> Yinghai Lu writes: > >> > >>> please check updated attached. It should address all your request. > >> > >> There is one significant bug that I can see. > >> > >> swiotlb_print_info tests no_iotlb_memory but no_iotlb_memory is set > >> after swiotlb_init_with_tlb returns. > > > > there is another swiotlb_print_info calling from > > pci_swiotlb_late_init > > > > void __init pci_swiotlb_late_init(void) > > { > > /* An IOMMU turned us off. */ > > if (!swiotlb) > > swiotlb_free(); > > else { > > printk(KERN_INFO "PCI-DMA: " > > "Using software bounce buffering for IO (SWIOTLB)\n"); > > swiotlb_print_info(); > > } > > } > > > > so we need that checking when swiotlb == 1, but actually we can not > > allocate that before. > > Eric, so the code is right to put checking in swiotlb_print_info ? > > I'd like to post the whole patchset again and ask HPA to put them in tip/next > to catch -v3.9 merging window. I'm the frontline maintainer of swiotlb and related stuff so if you want to follow the proper protocol you should wait until I give you my Ack. I need to check this patch out and then also test-run them on IA64, AMD-VI, Calgary-X GART and Intel VT-d to make a sanity test. However, this particular patch can go outside the mega-patchset you have. So you could post the mega-patchset to hpa without this being in it and just mention that there is this extra one that Konrad is handling.