[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA0PR11MB71851C5EF8BC5BADFD5A5D79F8A72@IA0PR11MB7185.namprd11.prod.outlook.com>
Date: Tue, 25 Mar 2025 06:32:18 +0000
From: "Kasireddy, Vivek" <vivek.kasireddy@...el.com>
To: Huan Yang <link@...o.com>, Hillf Danton <hdanton@...a.com>, "Christoph
Hellwig" <hch@....de>
CC: "bingbu.cao@...ux.intel.com" <bingbu.cao@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>, "opensource.kernel@...o.com"
<opensource.kernel@...o.com>, "urezki@...il.com" <urezki@...il.com>
Subject: RE: [PATCH] mm/vmalloc: fix mischeck pfn valid in vmap_pfns
Hi Huan,
> Subject: Re: [PATCH] mm/vmalloc: fix mischeck pfn valid in vmap_pfns
>
> HI Hillf,
>
> Thanks fo your suggestion.
>
> 在 2025/3/19 19:26, Hillf Danton 写道:
> > On Wed, 19 Mar 2025 09:08:51 +0100 Christoph Hellwig wrote:
> >> On Wed, Mar 19, 2025 at 01:03:55PM +0800, Hillf Danton wrote:
> >>> A quick fix is to add a vmap_pfn variant to walk around the pfn
> >>> check in question, like the following diff (just for idea show).
> >> No.
> >>
> > Patient to see your fix, given no low hanging peach left for Mr Folio
> > in case of HVO, (feel free to ignore, who is likely about 2.6-mile
> > less tough than you could be).
>
> I now believe there are two way to resolve the HVO folio can't vmap in
> udmabuf.
>
> 1. simple copy vmap_pfn code, don't bother common vmap_pfn, use by itself
> and remove pfn_valid check.
>
> 2. implement folio array based vmap(vmap_folios), which can given a range of
> each folio(offset, nr_pages), so can suit HVO folio's vmap.
>
> 1 is simple and can fast fix this issue, but may not too good. I need discuss with
> bot Christoph and udmabuf's maintainer.
>
> 2 is hard, but may worth to research, which I also will try to do. :)
Another option is to just limit udmabuf's vmap() to only shmem folios but I guess
it may not work as expected if THP is also enabled.
Bingbu, what exactly is your use-case? Could you please describe the scenario that
requires you to use udmabuf's vmap()?
Thanks,
Vivek
>
Powered by blists - more mailing lists