lkml.org 
[lkml]   [2015]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v5] modify the IO_TLB_SEGSIZE and IO_TLB_DEFAULT_SIZE configurable as flexible requirement about SW-IOMMU.
Date
Dear Jan

> -----Original Message-----
> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Thursday, March 5, 2015 4:40 PM
> To: Wang, Xiaoming
> Cc: Liu@aserp2030.oracle.com; Zhang@aserp2030.oracle.com; chris@chris-
> wilson.co.uk; david.vrabel@citrix.com; lauraa@codeaurora.org;
> heiko.carstens@de.ibm.com; linux@horizon.com; Liu, Chuansheng; Zhang,
> Dongxing; takahiro.akashi@linaro.org; akpm@linux-foundation.org; linux-
> mips@linux-mips.org; ralf@linux-mips.org; xen-devel@lists.xenproject.org;
> boris.ostrovsky@oracle.com; Konrad Rzeszutek Wilk;
> d.kasatkin@samsung.com; pebolle@tiscali.nl; linux-kernel@vger.kernel.org
> Subject: RE: [PATCH v5] modify the IO_TLB_SEGSIZE and
> IO_TLB_DEFAULT_SIZE configurable as flexible requirement about SW-
> IOMMU.
>
> >>> On 05.03.15 at 04:53, <xiaoming.wang@intel.com> wrote:
> >> From: Konrad Rzeszutek Wilk [mailto:konrad.wilk@oracle.com]
> >> Sent: Thursday, March 5, 2015 3:43 AM On Tue, Mar 03, 2015 at
> >> 04:11:09PM +0800, Wang Xiaoming wrote:
> >> > @@ -101,13 +119,32 @@ setup_io_tlb_npages(char *str) {
> >> > if (isdigit(*str)) {
> >> > io_tlb_nslabs = simple_strtoul(str, &str, 0);
> >> > - /* avoid tail segment of size < IO_TLB_SEGSIZE */
> >> > - io_tlb_nslabs = ALIGN(io_tlb_nslabs, IO_TLB_SEGSIZE);
> >> > }
> >> > if (*str == ',')
> >> > ++str;
> >> > - if (!strcmp(str, "force"))
> >> > + if (!strncmp(str, "force", 5)) {
> >> > swiotlb_force = 1;
> >> > + str += 5;
> >> > + }
> >>
> >> So the format is now:
> >>
> >> Format: { <int> | force | <int> | <int>}
> >>
> >> which means I can do
> >> 32,22323,force
> >>
> >> Or
> >> force,32
> >>
> >> Or
> >> 32,force
> >>
> > If I use Format: { <int>,force,<int>,<int>} 32,22323,force can't
> > acceptable.
> > There are three <int> here, if there are out of order, that will
> > cause confuse.
> > Only 32,force,32323
> > Or 32,,32323,2322
> > Or ,,323222,3232
> > Are available.
>
> You need to make sure that all previously valid variants are still usable, i.e.
> force alone, a number alone, force,<number> and <number>,force. How
> many variants you want to support with your additions is mostly up to you;
> I'd recommend permitting force in any position.
>
I don't think it's suitable to accept that "force" in any position.
If we defined Format: { <int>,force,<int>,<int>}
"force" must be located in second position.
And we add comment for each <int> also.
Every position may be defined specifically.

> Jan



\
 
 \ /
  Last update: 2015-03-05 10:01    [W:0.070 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site