[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <51ce238c-7870-581e-8d29-5d802e4d7dcd@fujitsu.com>
Date: Wed, 23 Nov 2022 06:12:05 +0000
From: "lizhijian@...itsu.com" <lizhijian@...itsu.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: "zyjzyj2000@...il.com" <zyjzyj2000@...il.com>,
"leon@...nel.org" <leon@...nel.org>,
Bob Pearson <rpearsonhpe@...il.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
Mark Bloch <mbloch@...dia.com>, Tom Talpey <tom@...pey.com>,
"tomasz.gromadzki@...el.com" <tomasz.gromadzki@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
"yangx.jy@...itsu.com" <yangx.jy@...itsu.com>,
"Yasunori Gotou (Fujitsu)" <y-goto@...itsu.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [for-next PATCH v6 04/10] RDMA/rxe: Allow registering persistent
flag for pmem MR only
On 22/11/2022 22:46, Jason Gunthorpe wrote:
> On Wed, Nov 16, 2022 at 04:19:45PM +0800, Li Zhijian wrote:
>> int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
>> int access, struct rxe_mr *mr)
>> {
>> @@ -148,16 +157,25 @@ int rxe_mr_init_user(struct rxe_dev *rxe, u64 start, u64 length, u64 iova,
>> num_buf = 0;
>> map = mr->map;
>> if (length > 0) {
>> - buf = map[0]->buf;
>> + bool persistent_access = access & IB_ACCESS_FLUSH_PERSISTENT;
>>
>> + buf = map[0]->buf;
>> for_each_sgtable_page (&umem->sgt_append.sgt, &sg_iter, 0) {
>> + struct page *pg = sg_page_iter_page(&sg_iter);
>> +
>> + if (persistent_access && !is_pmem_page(pg)) {
>> + pr_debug("Unable to register persistent access to non-pmem device\n");
>> + err = -EINVAL;
>> + goto err_release_umem;
>
> This should use rxe_dbg_mr()
>
Good catch, thanks
Zhijian
> Jason
Powered by blists - more mailing lists