lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 18 Feb 2015 12:35:39 -0500
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	"Wang, Xiaoming" <xiaoming.wang@...el.com>
Cc:	"ralf@...ux-mips.org" <ralf@...ux-mips.org>,
	"boris.ostrovsky@...cle.com" <boris.ostrovsky@...cle.com>,
	"david.vrabel@...rix.com" <david.vrabel@...rix.com>,
	"linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"xen-devel@...ts.xenproject.org" <xen-devel@...ts.xenproject.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"linux@...izon.com" <linux@...izon.com>,
	"lauraa@...eaurora.org" <lauraa@...eaurora.org>,
	"heiko.carstens@...ibm.com" <heiko.carstens@...ibm.com>,
	"d.kasatkin@...sung.com" <d.kasatkin@...sung.com>,
	"takahiro.akashi@...aro.org" <takahiro.akashi@...aro.org>,
	"chris@...is-wilson.co.uk" <chris@...is-wilson.co.uk>,
	"pebolle@...cali.nl" <pebolle@...cali.nl>,
	"Liu, Chuansheng" <chuansheng.liu@...el.com>,
	"Zhang, Dongxing" <dongxing.zhang@...el.com>
Subject: Re: [PATCH v3] modify the IO_TLB_SEGSIZE and IO_TLB_DEFAULT_SIZE
 configurable as flexible requirement about SW-IOMMU.

> > >  static int __init
> > > +setup_io_tlb_segsize(char *str)
> > > +{
> > > +	get_option(&str, &io_tlb_segsize);
> > > +	return 0;
> > > +}
> > > +__setup("io_tlb_segsize=", setup_io_tlb_segsize);
> > 
> > This should be folded in swiotlb=XYZ parsing please.
> > 
> I am not very clear about this comment.
> 1,	Do you mean it should use early_param instead of __setup?
> As I known early_param  can't help to assign the parameter that we changed at
> kernel cmdline  because we have the default value here.
> int io_tlb_segsize = 128;
> unsigned long io_tlb_default_size = (64UL<<20);

The code in 'setup_io_tlb_npages' - which is run when 'swiotlb=' parameter
is passed on the command line, can be modified to parse other extra
values. That is what I meant.

As in right now it assumes you want only to change the size of the
IOTLB buffer (64MB default). You can make the code be smarter and
accept two values, say:

  32768,128

Which should make the size by the default of 64MB with an io_tlb_segsize of 128.

Or you can do:

  32768,256

for also an 64MB with a io_tlb_segsize of 256 instead.


This offers users to manipulate these values as well as the initial
arch code which can modify 'io_tlb_nslabs' and 'io_tlb_segsize' during
bootup to their preferred values.

> 2,	Or do you mean use iotlbsegsize instead of io_tlb_segsize?

No. Just fold it all under 'swiotlb' parameter please.
> 
> > Also you will need to update the Documentaiton/kernel-parameters.txt file.

And naturally that will have to be updated.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ