From: Chris Wright Subject: Re: [PATCH 01/15] [swiotlb] fix: Update 'setup_io_tlb_npages' to accept both arguments in either order. Date: Tue, 19 Jan 2010 11:00:28 -0800 Message-ID: <20100119190028.GF3204@sequoia.sous-sol.org> References: <1263510064-16788-1-git-send-email-konrad.wilk@oracle.com> <1263510064-16788-2-git-send-email-konrad.wilk@oracle.com> <20100115012213.GA6021@sequoia.sous-sol.org> <20100119174729.GR11986@phenom.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20100119174729.GR11986@phenom.dumpdata.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Konrad Rzeszutek Wilk Cc: fujita.tomonori@lab.ntt.co.jp, jeremy@goop.org, xen-devel@lists.xensource.com, Ian.Campbell@eu.citrix.com, joerg.roedel@amd.com, Chris Wright , iommu@lists.linux-foundation.org, dwmw2@infradead.org, alex.williamson@hp.com List-Id: xen-devel@lists.xenproject.org * Konrad Rzeszutek Wilk (konrad.wilk@oracle.com) wrote: > On Thu, Jan 14, 2010 at 05:22:13PM -0800, Chris Wright wrote: > > * Konrad Rzeszutek Wilk (konrad.wilk@oracle.com) wrote: > > > Before this patch, if you specified 'swiotlb=force,1024' it would > > > ignore both arguments. This fixes it and allows the user specify it > > > in any order (or none at all). > > > > > > Signed-off-by: Konrad Rzeszutek Wilk > > > > Having only one substring of digits makes allowing arbitrary order > > less useful if more options get added (as in foo,bar,1024,baz,force > > would make more sense as foo,bar,nslabs=1024,baz,force). Do you > > think this one is really needed? If so, be useful to update > > I got caught a couple of times where I needed to provide both arguments > and could not figure out why it did not work. Switching the arguments > around fixed it. Thought that it might make sense to remove this > potential trap from other folks by this patch. > > Your point about more options got me thinking about the overflow buffer. > I could also provide an over-ride for that, maybe: > > "swiotlb=force,overflow=32,slabs=1024" Right, in which case would the is_digit() check remain ahead of the loop to protect the "legacy" format (swiotlb=1024,force), forcing mixing like you did to the new format (swiotlb=force,slabs=1024 or swiotlb=slabs=1024,force)? > (Not sure about the syntax?) > > > Documentation/kernel-parameters.txt which is slightly out of date now. > > Oh, good catch. Will roll the patch for that file as well. thanks, -chris