[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240509220147.3b0a0073@meshulam.tesarici.cz>
Date: Thu, 9 May 2024 22:01:47 +0200
From: Petr Tesařík <petr@...arici.cz>
To: "T.J. Mercier" <tjmercier@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>, Jonathan Corbet
<corbet@....net>, Tianyu Lan <Tianyu.Lan@...rosoft.com>,
mhklinux@...look.com, robin.murphy@....com, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH v2 2/3] doc: swiotlb: Document SWIOTLB areas parameter
On Thu, 9 May 2024 09:04:16 -0700
"T.J. Mercier" <tjmercier@...gle.com> wrote:
> On Wed, May 8, 2024 at 11:14 PM Petr Tesařík <petr@...arici.cz> wrote:
> >
> > On Tue, 7 May 2024 01:34:59 +0000
> > "T.J. Mercier" <tjmercier@...gle.com> wrote:
> >
> > > Commit 20347fca71a3 ("swiotlb: split up the global swiotlb lock") added
> > > the ability to specify the number of SWIOTLB areas, but boot-options.rst
> > > was not updated as part of that commit.
> > >
> > > Reported-by: Michael Kelley <mhklinux@...look.com>
> > > Fixes: 20347fca71a3 ("swiotlb: split up the global swiotlb lock")
> > > Signed-off-by: T.J. Mercier <tjmercier@...gle.com>
> > > ---
> > > Documentation/arch/x86/x86_64/boot-options.rst | 4 +++-
> > > 1 file changed, 3 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/arch/x86/x86_64/boot-options.rst b/Documentation/arch/x86/x86_64/boot-options.rst
> > > index a37139d1752f..18161657b301 100644
> > > --- a/Documentation/arch/x86/x86_64/boot-options.rst
> > > +++ b/Documentation/arch/x86/x86_64/boot-options.rst
> > > @@ -287,9 +287,11 @@ iommu options only relevant to the AMD GART hardware IOMMU:
> > > iommu options only relevant to the software bounce buffering (SWIOTLB) IOMMU
> > > implementation:
> > >
> > > - swiotlb=<slots>[,force,noforce]
> > > + swiotlb=<slots>[,<areas>,force,noforce]
> >
> > This is not quite how this parameter is parsed. All the following
> > specifications are valid:
> >
> > - swiotlb=512 // only slots
> > - swiotlb=,4 // only areas
> > - swiotlb=512,4 // slots and areas
> > - swiotlb=force // default size
> > - swiotlb=512,force // default areas
> > - swiotlb=512,4,force // explicitly specify everything
> >
> > I believe the syntax should be somethig like:
> >
> > swiotlb={ | [<slots>][,<areas>],}{ force | noforce }
> >
> > Petr T
> >
> What does the leading | mean in front of slots? How about brackets
I wanted to mark somehow that "force" and "noforce" alone do not
require a leading comma, but if you specify slots and/or areas, the
comma is required, like you write below.
> around force/noforce since they're also optional and mutually
> exclusive?
Right. I missed that.
> The Rebooting section uses double brackets instead of
> braces for groupings like that.
TBH I don't know what syntax is used here. Use anything that can capture
the variants I listed above.
> Only weird thing here is the
> force/noforce comma being potentially unneeded, but that's getting
> pretty picky and I think the intent is clear.
>
> swiotlb=[<slots>][,<areas>][, [force] | [noforce] ]
No objections from my side.
Petr T
Powered by blists - more mailing lists