[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZPseRunzsGSLeiGA@nvidia.com>
Date: Fri, 8 Sep 2023 10:14:46 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: "Daisuke Matsuda (Fujitsu)" <matsuda-daisuke@...itsu.com>
Cc: "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"leonro@...dia.com" <leonro@...dia.com>,
"'leon@...nel.org'" <leon@...nel.org>,
"zyjzyj2000@...il.com" <zyjzyj2000@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"rpearsonhpe@...il.com" <rpearsonhpe@...il.com>,
"Xiao Yang (Fujitsu)" <yangx.jy@...itsu.com>,
"Zhijian Li (Fujitsu)" <lizhijian@...itsu.com>,
"Yasunori Gotou (Fujitsu)" <y-goto@...itsu.com>
Subject: Re: [PATCH for-next v5 6/7] RDMA/rxe: Add support for
Send/Recv/Write/Read with ODP
On Fri, Sep 08, 2023 at 06:35:56AM +0000, Daisuke Matsuda (Fujitsu) wrote:
> > IIRC this also needs to keep track in the xarray on a per page basis
> > if the page is writable.
>
> An xarray entry can hold a pointer or a value from 0 to LONG_MAX.
> That is not enough to store page address and its permission.
It is, this is a page list so you know the lower 12 bits are not used
and you can encode stuff there.
> If we try to do everything with xarray, we need to allocate a new struct
> for each page that holds a pointer to a page and a value to store r/w permission.
> That is inefficient in terms of memory usage and implementation.
No, just use the lower extra bits.
> I think the xarray can be used to check presence of pages just like we have
> been doing in the non-ODP case. On the other hand, the permission
> should be fetched from umem_odp->pfn_list, which is updated everytime
> page fault is executed.
Definately not
Jason
Powered by blists - more mailing lists