[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PH0PR18MB500222E0231D648123200AD9CE002@PH0PR18MB5002.namprd18.prod.outlook.com>
Date: Mon, 8 Apr 2024 02:17:30 +0000
From: Linu Cherian <lcherian@...vell.com>
To: Pasha Tatashin <pasha.tatashin@...een.com>
CC: "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"alyssa@...enzweig.io"
<alyssa@...enzweig.io>,
"asahi@...ts.linux.dev" <asahi@...ts.linux.dev>,
"baolu.lu@...ux.intel.com" <baolu.lu@...ux.intel.com>,
"bhelgaas@...gle.com"
<bhelgaas@...gle.com>,
"cgroups@...r.kernel.org" <cgroups@...r.kernel.org>,
"corbet@....net" <corbet@....net>,
"david@...hat.com" <david@...hat.com>,
"dwmw2@...radead.org" <dwmw2@...radead.org>,
"hannes@...xchg.org"
<hannes@...xchg.org>,
"heiko@...ech.de" <heiko@...ech.de>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
"jernej.skrabec@...il.com"
<jernej.skrabec@...il.com>,
"jonathanh@...dia.com" <jonathanh@...dia.com>,
"joro@...tes.org" <joro@...tes.org>,
"krzysztof.kozlowski@...aro.org"
<krzysztof.kozlowski@...aro.org>,
"linux-doc@...r.kernel.org"
<linux-doc@...r.kernel.org>,
"linux-fsdevel@...r.kernel.org"
<linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-rockchip@...ts.infradead.org" <linux-rockchip@...ts.infradead.org>,
"linux-samsung-soc@...r.kernel.org" <linux-samsung-soc@...r.kernel.org>,
"linux-sunxi@...ts.linux.dev" <linux-sunxi@...ts.linux.dev>,
"linux-tegra@...r.kernel.org" <linux-tegra@...r.kernel.org>,
"lizefan.x@...edance.com" <lizefan.x@...edance.com>,
"marcan@...can.st"
<marcan@...can.st>,
"mhiramat@...nel.org" <mhiramat@...nel.org>,
"m.szyprowski@...sung.com" <m.szyprowski@...sung.com>,
"paulmck@...nel.org"
<paulmck@...nel.org>,
"rdunlap@...radead.org" <rdunlap@...radead.org>,
"robin.murphy@....com" <robin.murphy@....com>,
"samuel@...lland.org"
<samuel@...lland.org>,
"suravee.suthikulpanit@....com"
<suravee.suthikulpanit@....com>,
"sven@...npeter.dev" <sven@...npeter.dev>,
"thierry.reding@...il.com" <thierry.reding@...il.com>,
"tj@...nel.org"
<tj@...nel.org>,
"tomas.mudrunka@...il.com" <tomas.mudrunka@...il.com>,
"vdumpa@...dia.com" <vdumpa@...dia.com>,
"wens@...e.org" <wens@...e.org>, "will@...nel.org" <will@...nel.org>,
"yu-cheng.yu@...el.com"
<yu-cheng.yu@...el.com>,
"rientjes@...gle.com" <rientjes@...gle.com>,
"bagasdotme@...il.com" <bagasdotme@...il.com>,
"mkoutny@...e.com"
<mkoutny@...e.com>
Subject: Re: [PATCH v5 01/11] iommu/vt-d: add wrapper functions for page
allocations
Hi Pasha,
> -----Original Message-----
> From: Pasha Tatashin <pasha.tatashin@...een.com>
> Sent: Thursday, April 4, 2024 7:26 PM
> To: Linu Cherian <lcherian@...vell.com>
> Cc: akpm@...ux-foundation.org; alim.akhtar@...sung.com;
> alyssa@...enzweig.io; asahi@...ts.linux.dev; baolu.lu@...ux.intel.com;
> bhelgaas@...gle.com; cgroups@...r.kernel.org; corbet@....net;
> david@...hat.com; dwmw2@...radead.org; hannes@...xchg.org;
> heiko@...ech.de; iommu@...ts.linux.dev; jernej.skrabec@...il.com;
> jonathanh@...dia.com; joro@...tes.org; krzysztof.kozlowski@...aro.org;
> linux-doc@...r.kernel.org; linux-fsdevel@...r.kernel.org; linux-
> kernel@...r.kernel.org; linux-mm@...ck.org; linux-
> rockchip@...ts.infradead.org; linux-samsung-soc@...r.kernel.org; linux-
> sunxi@...ts.linux.dev; linux-tegra@...r.kernel.org;
> lizefan.x@...edance.com; marcan@...can.st; mhiramat@...nel.org;
> m.szyprowski@...sung.com; paulmck@...nel.org; rdunlap@...radead.org;
> robin.murphy@....com; samuel@...lland.org;
> suravee.suthikulpanit@....com; sven@...npeter.dev;
> thierry.reding@...il.com; tj@...nel.org; tomas.mudrunka@...il.com;
> vdumpa@...dia.com; wens@...e.org; will@...nel.org; yu-
> cheng.yu@...el.com; rientjes@...gle.com; bagasdotme@...il.com;
> mkoutny@...e.com
> Subject: [EXTERNAL] Re: [PATCH v5 01/11] iommu/vt-d: add wrapper
> functions for page allocations
>
> > Few minor nits.
>
> Hi Linu,
>
> Thank you for taking a look at this patch, my replies below.
>
> > > +/*
> > > + * All page allocations that should be reported to as
> > > +"iommu-pagetables" to
> > > + * userspace must use on of the functions below. This includes
> > > +allocations of
> > > + * page-tables and other per-iommu_domain configuration structures.
> >
> > /s/use on/use one/?
>
> I will correct in the next version (if there is going to be one).
>
> > > + *
> > > + * This is necessary for the proper accounting as IOMMU state can
> > > + be rather
> > > + * large, i.e. multiple gigabytes in size.
> > > + */
> > > +
> > > +/**
> > > + * __iommu_alloc_pages - allocate a zeroed page of a given order.
> > > + * @gfp: buddy allocator flags
> >
> > Shall we keep the comments generic here(avoid reference to allocator
> > algo) ?
>
> There are no references to allocator algorithm. I specify the zero page
> because this function adds __GFP_ZERO. The order and gfp arguments are
> provided by the caller, therefore, should be mentioned.
Just meant to remove the mention of "buddy allocator" in the above comments if I was not clear.
Ie. "* @gfp: allocator flags" instead of "* @gfp: buddy allocator flags" since that is allocator specific.
Thanks
Linu Cherian.
Powered by blists - more mailing lists