From: "Jan Beulich" <JBeulich@suse.com>
To: "Xiaoming Wang" <xiaoming.wang@intel.com>
Cc: "chris@chris-wilson.co.uk" <chris@chris-wilson.co.uk>,
"david.vrabel@citrix.com" <david.vrabel@citrix.com>,
"lauraa@codeaurora.org" <lauraa@codeaurora.org>,
"heiko.carstens@de.ibm.com" <heiko.carstens@de.ibm.com>,
"linux@horizon.com" <linux@horizon.com>,
"Chuansheng Liu" <chuansheng.liu@intel.com>,
"Dongxing Zhang" <dongxing.zhang@intel.com>,
"takahiro.akashi@linaro.org" <takahiro.akashi@linaro.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>,
"ralf@linux-mips.org" <ralf@linux-mips.org>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
"boris.ostrovsky@oracle.com" <boris.ostrovsky@oracle.com>,
"konrad.wilk@oracle.com" <konrad.wilk@oracle.com>,
"d.kasatkin@samsung.com" <d.kasatkin@samsung.com>,
"pebolle@tiscali.nl" <pebolle@tiscali.nl>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [Xen-devel] [PATCH v4] modify the IO_TLB_SEGSIZE and IO_TLB_DEFAULT_SIZE configurable as flexible requirement about SW-IOMMU.
Date: Wed, 18 Feb 2015 09:34:50 +0000 [thread overview]
Message-ID: <54E46ACA0200007800060F5C@mail.emea.novell.com> (raw)
In-Reply-To: <FA47D36D6EC9FE4CB463299737C09B9901D00FBD@shsmsx102.ccr.corp.intel.com>
>>> On 18.02.15 at 10:09, <xiaoming.wang@intel.com> wrote:
>> From: Jan Beulich [mailto:JBeulich@suse.com]
>> Sent: Tuesday, February 17, 2015 6:09 PM
>> >>> On 17.02.15 at 07:51, <xiaoming.wang@intel.com> wrote:
>> > --- a/Documentation/kernel-parameters.txt
>> > +++ b/Documentation/kernel-parameters.txt
>> > @@ -3438,10 +3438,12 @@ bytes respectively. Such letter suffixes can
>> > also be entirely omitted.
>> > it if 0 is given (See
>> Documentation/cgroups/memory.txt)
>> >
>> > swiotlb= [ARM,IA-64,PPC,MIPS,X86]
>> > - Format: { <int> | force }
>> > + Format: { <int> | force | <int> | <int>}
>> > <int> -- Number of I/O TLB slabs
>> > force -- force using of bounce buffers even if they
>> > wouldn't be automatically used by the kernel
>> > + <int> -- Maximum allowable number of contiguous
>> slabs to map
>> > + <int> -- The size of SW-MMU mapped.
>>
>> This makes no sense - the new numbers added aren't position independent
>> (nor were the previous <int> and "force").
>>
> Use "," can separate them one by one.
> We do it at lib/swiotlb.c
Right, but the documentation above doesn't say so.
>> Also you are (supposedly) removing all uses of IO_TLB_DEFAULT_SIZE, yet
>> you don't seem to remove the definition itself.
>>
> I have change all uses of IO_TLB_DEFAULT_SIZE to io_tlb_default_size in
> lib/swiotlb.c
Then are there any left elsewhere? If not, again - why don't you
remove the definition of IO_TLB_DEFAULT_SIZE?
>> Finally - are arbitrary numbers really okay for the newly added command line
>> options? I.e. shouldn't you add some checking of their validity?
>>
> I have validity these code is OK.
> Example:
> BOARD_KERNEL_CMDLINE += swiotlb=, ,512,268435456
> Io_tlb_segsize has been changed from 128 to 512
> Io_tlb_default_size has been changed from 64M to 268435456 (256M)
I specifically said "arbitrary numbers", which in particular includes
zero and non-power-of-2 values. If there are any restrictions on
which numbers can validly be passed here (and it very much looks
like there are), such restrictions should be enforced imo.
Jan
next prev parent reply other threads:[~2015-02-18 9:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 6:51 Wang Xiaoming
2015-02-17 10:08 ` [Xen-devel] " Jan Beulich
2015-02-18 9:09 ` Wang, Xiaoming
2015-02-18 9:34 ` Jan Beulich [this message]
2015-02-18 9:56 ` Wang, Xiaoming
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=54E46ACA0200007800060F5C@mail.emea.novell.com \
--to=jbeulich@suse.com \
--cc=akpm@linux-foundation.org \
--cc=boris.ostrovsky@oracle.com \
--cc=chris@chris-wilson.co.uk \
--cc=chuansheng.liu@intel.com \
--cc=d.kasatkin@samsung.com \
--cc=david.vrabel@citrix.com \
--cc=dongxing.zhang@intel.com \
--cc=heiko.carstens@de.ibm.com \
--cc=konrad.wilk@oracle.com \
--cc=lauraa@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=linux@horizon.com \
--cc=pebolle@tiscali.nl \
--cc=ralf@linux-mips.org \
--cc=takahiro.akashi@linaro.org \
--cc=xen-devel@lists.xenproject.org \
--cc=xiaoming.wang@intel.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
all inboxes | Powered by JetHome®