[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b97f8d1b-3116-5677-f327-27f394eb6c89@fujitsu.com>
Date: Fri, 18 Nov 2022 01:32:37 +0000
From: "lizhijian@...itsu.com" <lizhijian@...itsu.com>
To: "Fabio M. De Francesco" <fmdefrancesco@...il.com>
CC: Zhu Yanjun <zyjzyj2000@...il.com>, Jason Gunthorpe <jgg@...pe.ca>,
Leon Romanovsky <leon@...nel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ira Weiny <ira.weiny@...el.com>
Subject: Re: [for-next PATCH 4/5] RDMA/rxe: refactor iova_to_vaddr
On 16/11/2022 20:37, Fabio M. De Francesco wrote:
>> - return (void *)(uintptr_t)mr->map[m]->buf[n].addr + offset;
>> + if (mr->ibmr.type == IB_MR_TYPE_USER) {
>> + char *paddr;
>> + struct page *pg = mr->map[m]->buf[n].page;
>> +
>> + paddr = kmap_local_page(pg);
>> + if (paddr == NULL) {
>> + pr_warn("Failed to map page");
>> + return NULL;
>> + }
> I know nothing about this code but I am here as a result of regular checks for
> changes to HIGHMEM mappings across the entire kernel. So please forgive me if
> I'm objecting to the correct changes.
>
> 1) It looks like this code had a call to page_address() and you converted it
> to mapping with kmap_local_page().
>
> If page_address() is related and it used to work properly, the page you are
> mapping cannot come from ZONE_HIGHMEM.
Yes, you are totally right.
Therefore, kmap_local_page() looks like
> an overkill.
The confusion about the page_address() here has been raised for a long
time[1][2].
https://www.spinics.net/lists/linux-rdma/msg113206.html
https://lore.kernel.org/all/20220121160654.GC773547@iweiny-DESK2.sc.intel.com/
Thanks
Zhijian
>
> I'm probably missing something...
>
Powered by blists - more mailing lists