[PATCH v5 01/11] iommu/vt-d: add wrapper functions for page allocations

Linu Cherian lcherian at marvell.com
Sun Apr 7 19:17:30 PDT 2024


Hi Pasha,

> -----Original Message-----
> From: Pasha Tatashin <pasha.tatashin at soleen.com>
> Sent: Thursday, April 4, 2024 7:26 PM
> To: Linu Cherian <lcherian at marvell.com>
> Cc: akpm at linux-foundation.org; alim.akhtar at samsung.com;
> alyssa at rosenzweig.io; asahi at lists.linux.dev; baolu.lu at linux.intel.com;
> bhelgaas at google.com; cgroups at vger.kernel.org; corbet at lwn.net;
> david at redhat.com; dwmw2 at infradead.org; hannes at cmpxchg.org;
> heiko at sntech.de; iommu at lists.linux.dev; jernej.skrabec at gmail.com;
> jonathanh at nvidia.com; joro at 8bytes.org; krzysztof.kozlowski at linaro.org;
> linux-doc at vger.kernel.org; linux-fsdevel at vger.kernel.org; linux-
> kernel at vger.kernel.org; linux-mm at kvack.org; linux-
> rockchip at lists.infradead.org; linux-samsung-soc at vger.kernel.org; linux-
> sunxi at lists.linux.dev; linux-tegra at vger.kernel.org;
> lizefan.x at bytedance.com; marcan at marcan.st; mhiramat at kernel.org;
> m.szyprowski at samsung.com; paulmck at kernel.org; rdunlap at infradead.org;
> robin.murphy at arm.com; samuel at sholland.org;
> suravee.suthikulpanit at amd.com; sven at svenpeter.dev;
> thierry.reding at gmail.com; tj at kernel.org; tomas.mudrunka at gmail.com;
> vdumpa at nvidia.com; wens at csie.org; will at kernel.org; yu-
> cheng.yu at intel.com; rientjes at google.com; bagasdotme at gmail.com;
> mkoutny at suse.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.


More information about the Linux-rockchip mailing list