lkml.org 
[lkml]   [2024]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5 01/11] iommu/vt-d: add wrapper functions for page allocations
Date
Hi Pasha,

> -----Original Message-----
> From: Pasha Tatashin <pasha.tatashin@soleen.com>
> Sent: Thursday, April 4, 2024 7:26 PM
> To: Linu Cherian <lcherian@marvell.com>
> Cc: akpm@linux-foundation.org; alim.akhtar@samsung.com;
> alyssa@rosenzweig.io; asahi@lists.linux.dev; baolu.lu@linux.intel.com;
> bhelgaas@google.com; cgroups@vger.kernel.org; corbet@lwn.net;
> david@redhat.com; dwmw2@infradead.org; hannes@cmpxchg.org;
> heiko@sntech.de; iommu@lists.linux.dev; jernej.skrabec@gmail.com;
> jonathanh@nvidia.com; joro@8bytes.org; krzysztof.kozlowski@linaro.org;
> linux-doc@vger.kernel.org; linux-fsdevel@vger.kernel.org; linux-
> kernel@vger.kernel.org; linux-mm@kvack.org; linux-
> rockchip@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-
> sunxi@lists.linux.dev; linux-tegra@vger.kernel.org;
> lizefan.x@bytedance.com; marcan@marcan.st; mhiramat@kernel.org;
> m.szyprowski@samsung.com; paulmck@kernel.org; rdunlap@infradead.org;
> robin.murphy@arm.com; samuel@sholland.org;
> suravee.suthikulpanit@amd.com; sven@svenpeter.dev;
> thierry.reding@gmail.com; tj@kernel.org; tomas.mudrunka@gmail.com;
> vdumpa@nvidia.com; wens@csie.org; will@kernel.org; yu-
> cheng.yu@intel.com; rientjes@google.com; bagasdotme@gmail.com;
> mkoutny@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.
\
 
 \ /
  Last update: 2024-05-27 16:28    [W:0.225 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site