From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751232AbcFXKxT (ORCPT ); Fri, 24 Jun 2016 06:53:19 -0400 Received: from foss.arm.com ([217.140.101.70]:58187 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750956AbcFXKxS (ORCPT ); Fri, 24 Jun 2016 06:53:18 -0400 Subject: Re: [PATCH] arm64:swiotlb:Enable only when Input size through command line To: Konrad Rzeszutek Wilk , Jisheng Zhang References: <1466684020-5224-1-git-send-email-manjeet.p@samsung.com> <20160623143034.GN6521@e104818-lin.cambridge.arm.com> <9A15F5E5-775E-4079-961F-67FD54B8F2F4@oracle.com> <20160624105729.095e7f1f@xhacker> <20160624104619.GA4378@localhost.localdomain> Cc: Konrad Rzeszutek Wilk , corbet@lwn.net, Catalin Marinas , linux-doc@vger.kernel.org, will.deacon@arm.com, linux-kernel@vger.kernel.org, ajeet.y@samsung.com, akhilesh.k@samsung.com, linux-arm-kernel@lists.infradead.org, r.thapliyal@samsung.com, Manjeet Pawar , pankaj.m@samsung.com From: Robin Murphy Message-ID: <576D1119.3000907@arm.com> Date: Fri, 24 Jun 2016 11:53:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160624104619.GA4378@localhost.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Konrad, On 24/06/16 11:46, Konrad Rzeszutek Wilk wrote: > On Fri, Jun 24, 2016 at 10:57:29AM +0800, Jisheng Zhang wrote: >> Dear Konrad, >> >> On Thu, 23 Jun 2016 12:06:10 -0400 Konrad Rzeszutek Wilk wrote: >> >>> On June 23, 2016 10:30:34 AM EDT, Catalin Marinas wrote: >>>> On Thu, Jun 23, 2016 at 05:43:40PM +0530, Manjeet Pawar wrote: >>>>> From: Rohit Thapliyal >>>>> >>>>> swiotlb default size of 64M is too big as >>>>> default value therefore it is made configurable >>>>> through command line through swiotlb_size parameter. >>>>> swiotlb allocation shall be done only when the >>>>> swiotlb size is given through command line. >>>>> Otherwise no swiotlb is allocated. >>>> >>>> I already queued this patch: >>>> >>>> http://lkml.kernel.org/g/1465372426-4077-1-git-send-email-jszhang@marvell.com >>>> >>>> If you have any objections to it, please reply there. >>> >>> >>> I do (sorry about duplicate email, the other got rejected by mailing lists). >>> >>> Why not expand the swiotlb= parameter instead of introducing a new one? >> >> Do you mean pass "swiotlb=" for those platforms(most probably, arm64 with less >> than 4GB DDR) which don't need swiotlb? I'm afraid this is not convenient, and > > Why not just have a function that checks the amount of memory? x86 has > that - if it finds that the machine has less than 4GB it will not setup > SWIOTLB? > >> users even don't notice swiotlb parameter. From another side, pass "swiotlb=0" >> will make the swiotlb reserve 64MB instead, so how can we achieve zero reserved >> memory for swiotlb through "swiotlb=" parameter? > > Obviously make the function understand that 0 is to turn it off. >> >> PS: my patch didn't introduce new boot parameter. > > swiotlb_sz ? Note that Jisheng's patch is the one Catalin linked to, *not* this one, and more or less does exactly what you describe. Robin. >> >> I'm not sure I got your meaning, so could you please comment my patch >> directly? >> >> Thanks, >> Jisheng >> >>> >>> Also, why not use the swiotlb by itself? That does the job as well? >>> >>> >>> _______________________________________________ >>> linux-arm-kernel mailing list >>> linux-arm-kernel@lists.infradead.org >>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >> > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel >